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
70afef87
Commit
70afef87
authored
Oct 12, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BDM: increase member delay - force entry delay
parent
d7c8bf5d
Pipeline
#2431
passed with stage
in 1 minute 23 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
admin.py
members/admin.py
+28
-0
No files found.
members/admin.py
View file @
70afef87
...
@@ -440,6 +440,34 @@ def regenerate_member_delay(request):
...
@@ -440,6 +440,34 @@ def regenerate_member_delay(request):
res
[
"create_delay"
]
=
cs
.
create_delay
(
data
=
data
,
duration
=
duration
,
ext_name
=
ext_name
)
res
[
"create_delay"
]
=
cs
.
create_delay
(
data
=
data
,
duration
=
duration
,
ext_name
=
ext_name
)
if
(
res
[
"create_delay"
]):
try
:
# Add 0 pt to counter so odoo updates member status
data
=
{
'name'
:
"Forcer l'entrée en délai"
,
'shift_id'
:
False
,
'type'
:
"standard"
,
'partner_id'
:
member_id
,
'point_qty'
:
0
}
cm
.
update_member_points
(
data
)
data
=
{
'name'
:
"Forcer l'entrée en délai"
,
'shift_id'
:
False
,
'type'
:
"ftop"
,
'partner_id'
:
member_id
,
'point_qty'
:
0
}
cm
.
update_member_points
(
data
)
res
[
"force_entry_delay"
]
=
True
except
Exception
as
e
:
print
(
str
(
e
))
else
:
coop_logger
.
error
(
"regenerate_member_delay:
%
s,
%
s"
,
str
(
res
[
"create_delay"
]),
str
(
data
))
return
HttpResponseServerError
()
res
[
"member_data"
]
=
CagetteMembers
.
get_makeups_members
([
member_id
])[
0
]
res
[
"member_data"
]
=
CagetteMembers
.
get_makeups_members
([
member_id
])[
0
]
response
=
JsonResponse
(
res
,
safe
=
False
)
response
=
JsonResponse
(
res
,
safe
=
False
)
...
...
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