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
0a59be37
Commit
0a59be37
authored
Sep 08, 2021
by
François
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use now data instead of '14:28' in registration_done method (members)
parent
a48e0efe
Pipeline
#1288
failed with stage
in 1 minute 20 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
models.py
members/models.py
+5
-1
No files found.
members/models.py
View file @
0a59be37
...
...
@@ -1090,7 +1090,11 @@ class CagetteServices(models.Model):
f
=
{
'state'
:
'done'
}
late_mode
=
getattr
(
settings
,
'ENTRANCE_WITH_LATE_MODE'
,
False
)
if
late_mode
is
True
:
services
=
CagetteServices
.
get_services_at_time
(
'14:28'
,
0
,
with_members
=
False
)
# services = CagetteServices.get_services_at_time('14:28',0, with_members=False)
local_tz
=
timezone
(
'Europe/Paris'
)
now
=
datetime
.
datetime
.
now
()
.
astimezone
(
local_tz
)
.
strftime
(
"
%
H:
%
MZ"
)
# coop_logger.info("Maintenant = %s", now)
services
=
CagetteServices
.
get_services_at_time
(
now
,
0
,
with_members
=
False
)
if
len
(
services
)
>
0
:
# Notice : Despite is_late is defined as boolean in Odoo, 0 or 1 is needed for api call
is_late
=
0
...
...
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