Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
2a9168ae
Commit
2a9168ae
authored
Sep 08, 2022
by
François C.
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'adaptation_supercoop' into adaptation_supercoop_supercafoutch
parents
191dc696
1c6a58c9
Pipeline
#2361
passed with stage
in 1 minute 22 seconds
Changes
10
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
8 deletions
+23
-8
models.py
inventory/models.py
+4
-1
admin.py
members/admin.py
+2
-1
manage_attached.js
members/static/js/admin/manage_attached.js
+0
-1
orders_helper.js
orders/static/js/orders_helper.js
+1
-1
views.py
orders/views.py
+3
-2
config.md
outils/config.md
+4
-0
views.py
outils/views.py
+1
-1
models.py
shelfs/models.py
+0
-0
models.py
shifts/models.py
+6
-1
index.html
templates/members/admin/index.html
+2
-0
No files found.
inventory/models.py
View file @
2a9168ae
...
@@ -90,16 +90,19 @@ class CagetteInventory(models.Model):
...
@@ -90,16 +90,19 @@ class CagetteInventory(models.Model):
p
[
k
]
=
''
p
[
k
]
=
''
# Get shelf sortorder
# Get shelf sortorder
if
p
[
'shelf_id'
]
is
not
False
:
if
p
[
'shelf_id'
]
is
not
False
and
len
(
p
[
'shelf_id'
])
>
0
:
c
=
[[
'id'
,
'='
,
p
[
'shelf_id'
][
0
]]]
c
=
[[
'id'
,
'='
,
p
[
'shelf_id'
][
0
]]]
f
=
[
'id'
,
'sort_order'
]
f
=
[
'id'
,
'sort_order'
]
res_sortorder
=
api
.
search_read
(
'product.shelfs'
,
c
,
f
)
res_sortorder
=
api
.
search_read
(
'product.shelfs'
,
c
,
f
)
if
res_sortorder
:
if
res_sortorder
:
p
[
'shelf_sortorder'
]
=
res_sortorder
[
0
][
'sort_order'
]
p
[
'shelf_sortorder'
]
=
res_sortorder
[
0
][
'sort_order'
]
else
:
p
[
'shelf_sortorder'
]
=
''
res
[
'data'
]
=
pdts
res
[
'data'
]
=
pdts
except
Exception
as
e
:
except
Exception
as
e
:
coop_logger
.
error
(
"get_custom_list_products -> Erreur lors de la récupération des produits :
%
s"
,
str
(
e
))
res
[
'error'
]
=
"Erreur lors de la récupération des produits ("
+
str
(
e
)
+
")"
res
[
'error'
]
=
"Erreur lors de la récupération des produits ("
+
str
(
e
)
+
")"
return
res
return
res
...
...
members/admin.py
View file @
2a9168ae
...
@@ -313,7 +313,8 @@ def admin(request):
...
@@ -313,7 +313,8 @@ def admin(request):
""" Administration des membres """
""" Administration des membres """
template
=
loader
.
get_template
(
'members/admin/index.html'
)
template
=
loader
.
get_template
(
'members/admin/index.html'
)
context
=
{
'title'
:
'BDM'
,
context
=
{
'title'
:
'BDM'
,
'module'
:
'Membres'
}
'module'
:
'Membres'
,
'admin_binome_active'
:
getattr
(
settings
,
'ADMIN_BINOME_ACTIVE'
,
True
),}
return
HttpResponse
(
template
.
render
(
context
,
request
))
return
HttpResponse
(
template
.
render
(
context
,
request
))
def
manage_makeups
(
request
):
def
manage_makeups
(
request
):
...
...
members/static/js/admin/manage_attached.js
View file @
2a9168ae
...
@@ -284,7 +284,6 @@ function create_pair(payload) {
...
@@ -284,7 +284,6 @@ function create_pair(payload) {
data
.
responseJSON
.
errors
.
map
(
function
(
error
)
{
data
.
responseJSON
.
errors
.
map
(
function
(
error
)
{
message
+=
(
'
\
n'
+
error
);
message
+=
(
'
\
n'
+
error
);
return
null
;
return
null
;
});
});
}
}
...
...
orders/static/js/orders_helper.js
View file @
2a9168ae
...
@@ -1079,7 +1079,7 @@ function generate_inventory() {
...
@@ -1079,7 +1079,7 @@ function generate_inventory() {
}
else
{
}
else
{
$
(
'#do_inventory'
).
empty
()
$
(
'#do_inventory'
).
empty
()
.
append
(
`Faire un inventaire`
);
.
append
(
`Faire un inventaire`
);
let
msg
=
"erreur serveur lors de la création de l'inventaire"
.
let
msg
=
"erreur serveur lors de la création de l'inventaire"
,
err
=
{
msg
:
msg
,
ctx
:
'generate_inventory'
};
err
=
{
msg
:
msg
,
ctx
:
'generate_inventory'
};
if
(
typeof
data
.
responseJSON
!=
'undefined'
&&
typeof
data
.
responseJSON
.
error
!=
'undefined'
)
{
if
(
typeof
data
.
responseJSON
!=
'undefined'
&&
typeof
data
.
responseJSON
.
error
!=
'undefined'
)
{
...
...
orders/views.py
View file @
2a9168ae
...
@@ -123,7 +123,7 @@ def get_orders_attachment(request):
...
@@ -123,7 +123,7 @@ def get_orders_attachment(request):
for
item
in
res
:
for
item
in
res
:
if
'error'
in
item
:
if
'error'
in
item
:
return
JsonResponse
(
res
,
status
=
500
)
return
JsonResponse
(
res
,
status
=
500
,
safe
=
False
)
return
JsonResponse
({
'res'
:
res
})
return
JsonResponse
({
'res'
:
res
})
...
@@ -133,6 +133,7 @@ def export_one(request, oid):
...
@@ -133,6 +133,7 @@ def export_one(request, oid):
oid
=
int
(
oid
)
oid
=
int
(
oid
)
order
=
Order
(
oid
)
order
=
Order
(
oid
)
order_data
=
order
.
export
()
order_data
=
order
.
export
()
if
(
'success'
in
order_data
)
and
(
order_data
[
'success'
]
is
True
):
if
(
'success'
in
order_data
)
and
(
order_data
[
'success'
]
is
True
):
now
=
datetime
.
datetime
.
now
()
now
=
datetime
.
datetime
.
now
()
taxes
=
0
taxes
=
0
...
@@ -176,7 +177,7 @@ def export_one(request, oid):
...
@@ -176,7 +177,7 @@ def export_one(request, oid):
# return response
# return response
except
Exception
as
e
:
except
Exception
as
e
:
msg
=
str
(
e
)
msg
=
str
(
e
)
coop_logger
.
error
(
"Order export error :
%
s"
,
msg
)
return
JsonResponse
({
"msg"
:
msg
},
safe
=
False
)
return
JsonResponse
({
"msg"
:
msg
},
safe
=
False
)
def
export_regex
(
request
,
string
):
def
export_regex
(
request
,
string
):
...
...
outils/config.md
View file @
2a9168ae
...
@@ -432,6 +432,10 @@
...
@@ -432,6 +432,10 @@
If True, in BDM Admin manage shift template, on the calendar when subscribing a partner to a shift, "Volant" button is included
If True, in BDM Admin manage shift template, on the calendar when subscribing a partner to a shift, "Volant" button is included
-
ADMIN_BINOME_ACTIVE = False
By defaut, True. Show "Gestion des binômes" in bdm admin
### Miscellious
### Miscellious
-
EXPORT_COMPTA_FORMAT = 'Quadratus'
-
EXPORT_COMPTA_FORMAT = 'Quadratus'
...
...
outils/views.py
View file @
2a9168ae
...
@@ -88,7 +88,7 @@ class FieldsView(View):
...
@@ -88,7 +88,7 @@ class FieldsView(View):
u"""Nous allons retourner les attributs Odoo correspondants."""
u"""Nous allons retourner les attributs Odoo correspondants."""
entity
=
request
.
POST
.
get
(
"entity"
,
""
)
entity
=
request
.
POST
.
get
(
"entity"
,
""
)
fields
=
[]
fields
=
[]
if
len
(
entity
)
>
1
:
if
getattr
(
settings
,
'APP_ENV'
,
"prod"
)
==
"dev"
and
len
(
entity
)
>
1
:
api
=
OdooAPI
()
api
=
OdooAPI
()
fields
=
api
.
get_entity_fields
(
entity
)
fields
=
api
.
get_entity_fields
(
entity
)
template
=
loader
.
get_template
(
'common/entity_fields.html'
)
template
=
loader
.
get_template
(
'common/entity_fields.html'
)
...
...
shelfs/models.py
View file @
2a9168ae
shifts/models.py
View file @
2a9168ae
...
@@ -373,7 +373,12 @@ class CagetteShift(models.Model):
...
@@ -373,7 +373,12 @@ class CagetteShift(models.Model):
def
member_can_have_delay
(
self
,
partner_id
):
def
member_can_have_delay
(
self
,
partner_id
):
""" Can a member have a delay? """
""" Can a member have a delay? """
return
self
.
o_api
.
execute
(
'res.partner'
,
'can_have_extension'
,
[
partner_id
])
answer
=
False
try
:
answer
=
self
.
o_api
.
execute
(
'res.partner'
,
'can_have_extension'
,
[
partner_id
])
except
Exception
as
e
:
coop_logger
.
error
(
"member_can_have_delay :
%
s"
,
str
(
e
))
return
answer
def
update_counter_event
(
self
,
fields
):
def
update_counter_event
(
self
,
fields
):
""" Add/remove points """
""" Add/remove points """
...
...
templates/members/admin/index.html
View file @
2a9168ae
...
@@ -29,10 +29,12 @@
...
@@ -29,10 +29,12 @@
Gestion des présences
Gestion des présences
<span
class=
"management_type_button_icons"
><i
class=
"fas fa-arrow-right"
></i></span>
<span
class=
"management_type_button_icons"
><i
class=
"fas fa-arrow-right"
></i></span>
</button><br>
</button><br>
{% if admin_binome_active %}
<button
type=
"button"
class=
"btn--primary management_type_button"
id=
"manage_attached_button"
>
<button
type=
"button"
class=
"btn--primary management_type_button"
id=
"manage_attached_button"
>
Gestion des binômes
Gestion des binômes
<span
class=
"management_type_button_icons"
><i
class=
"fas fa-arrow-right"
></i></span>
<span
class=
"management_type_button_icons"
><i
class=
"fas fa-arrow-right"
></i></span>
</button><br>
</button><br>
{% endif %}
<button
type=
"button"
class=
"btn--primary management_type_button"
id=
"manage_regular_shifts_button"
>
<button
type=
"button"
class=
"btn--primary management_type_button"
id=
"manage_regular_shifts_button"
>
Gestion des créneaux
Gestion des créneaux
<span
class=
"management_type_button_icons"
><i
class=
"fas fa-arrow-right"
></i></span>
<span
class=
"management_type_button_icons"
><i
class=
"fas fa-arrow-right"
></i></span>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment