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
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
25 additions
and
12 deletions
+25
-12
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
+4
-4
config.md
outils/config.md
+4
-0
views.py
outils/views.py
+1
-1
models.py
shelfs/models.py
+1
-2
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):
p
[
k
]
=
''
# 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
]]]
f
=
[
'id'
,
'sort_order'
]
res_sortorder
=
api
.
search_read
(
'product.shelfs'
,
c
,
f
)
if
res_sortorder
:
p
[
'shelf_sortorder'
]
=
res_sortorder
[
0
][
'sort_order'
]
else
:
p
[
'shelf_sortorder'
]
=
''
res
[
'data'
]
=
pdts
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
)
+
")"
return
res
...
...
members/admin.py
View file @
2a9168ae
...
...
@@ -313,7 +313,8 @@ def admin(request):
""" Administration des membres """
template
=
loader
.
get_template
(
'members/admin/index.html'
)
context
=
{
'title'
:
'BDM'
,
'module'
:
'Membres'
}
'module'
:
'Membres'
,
'admin_binome_active'
:
getattr
(
settings
,
'ADMIN_BINOME_ACTIVE'
,
True
),}
return
HttpResponse
(
template
.
render
(
context
,
request
))
def
manage_makeups
(
request
):
...
...
members/static/js/admin/manage_attached.js
View file @
2a9168ae
...
...
@@ -284,7 +284,6 @@ function create_pair(payload) {
data
.
responseJSON
.
errors
.
map
(
function
(
error
)
{
message
+=
(
'
\
n'
+
error
);
return
null
;
});
}
...
...
orders/static/js/orders_helper.js
View file @
2a9168ae
...
...
@@ -1079,7 +1079,7 @@ function generate_inventory() {
}
else
{
$
(
'#do_inventory'
).
empty
()
.
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'
};
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):
for
item
in
res
:
if
'error'
in
item
:
return
JsonResponse
(
res
,
status
=
500
)
return
JsonResponse
(
res
,
status
=
500
,
safe
=
False
)
return
JsonResponse
({
'res'
:
res
})
...
...
@@ -133,6 +133,7 @@ def export_one(request, oid):
oid
=
int
(
oid
)
order
=
Order
(
oid
)
order_data
=
order
.
export
()
if
(
'success'
in
order_data
)
and
(
order_data
[
'success'
]
is
True
):
now
=
datetime
.
datetime
.
now
()
taxes
=
0
...
...
@@ -176,7 +177,7 @@ def export_one(request, oid):
# return response
except
Exception
as
e
:
msg
=
str
(
e
)
coop_logger
.
error
(
"Order export error :
%
s"
,
msg
)
return
JsonResponse
({
"msg"
:
msg
},
safe
=
False
)
def
export_regex
(
request
,
string
):
...
...
@@ -258,4 +259,4 @@ def print_product_labels(request):
res
[
'errors'
]
.
append
(
pres
)
except
Exception
as
e
:
res
[
'error_ext'
]
=
str
(
e
)
return
JsonResponse
({
'res'
:
res
},
safe
=
False
)
\ No newline at end of file
return
JsonResponse
({
'res'
:
res
},
safe
=
False
)
outils/config.md
View file @
2a9168ae
...
...
@@ -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
-
ADMIN_BINOME_ACTIVE = False
By defaut, True. Show "Gestion des binômes" in bdm admin
### Miscellious
-
EXPORT_COMPTA_FORMAT = 'Quadratus'
...
...
outils/views.py
View file @
2a9168ae
...
...
@@ -88,7 +88,7 @@ class FieldsView(View):
u"""Nous allons retourner les attributs Odoo correspondants."""
entity
=
request
.
POST
.
get
(
"entity"
,
""
)
fields
=
[]
if
len
(
entity
)
>
1
:
if
getattr
(
settings
,
'APP_ENV'
,
"prod"
)
==
"dev"
and
len
(
entity
)
>
1
:
api
=
OdooAPI
()
fields
=
api
.
get_entity_fields
(
entity
)
template
=
loader
.
get_template
(
'common/entity_fields.html'
)
...
...
shelfs/models.py
View file @
2a9168ae
...
...
@@ -591,4 +591,4 @@ class Shelfs(models.Model):
except
Exception
as
e
:
res
[
'error'
]
=
str
(
e
)
coop_logger
.
error
(
"Rayons, make_products_shelf_links :
%
s"
,
str
(
e
))
return
res
\ No newline at end of file
return
res
shifts/models.py
View file @
2a9168ae
...
...
@@ -373,7 +373,12 @@ class CagetteShift(models.Model):
def
member_can_have_delay
(
self
,
partner_id
):
""" 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
):
""" Add/remove points """
...
...
templates/members/admin/index.html
View file @
2a9168ae
...
...
@@ -29,10 +29,12 @@
Gestion des présences
<span
class=
"management_type_button_icons"
><i
class=
"fas fa-arrow-right"
></i></span>
</button><br>
{% if admin_binome_active %}
<button
type=
"button"
class=
"btn--primary management_type_button"
id=
"manage_attached_button"
>
Gestion des binômes
<span
class=
"management_type_button_icons"
><i
class=
"fas fa-arrow-right"
></i></span>
</button><br>
{% endif %}
<button
type=
"button"
class=
"btn--primary management_type_button"
id=
"manage_regular_shifts_button"
>
Gestion des créneaux
<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