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
659ede3e
Commit
659ede3e
authored
Dec 15, 2023
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename method
parent
02b48dfc
Pipeline
#3189
failed with stage
in 1 minute 6 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
models.py
members/models.py
+1
-1
models.py
shifts/models.py
+1
-1
No files found.
members/models.py
View file @
659ede3e
...
@@ -1290,7 +1290,7 @@ class CagetteMembers(models.Model):
...
@@ -1290,7 +1290,7 @@ class CagetteMembers(models.Model):
# 2 : providing makeups to come to all members
# 2 : providing makeups to come to all members
cs
=
CagetteShift
()
cs
=
CagetteShift
()
makeups_to_come_per_partner
=
cs
.
get_
count_of_makeups_to_come_per_partner
()
makeups_to_come_per_partner
=
cs
.
get_
partners_with_makeups_to_come
()
# 1 : fetching members with no makeups to do but with some makeups to come
# 1 : fetching members with no makeups to do but with some makeups to come
cond
=
[[
'makeups_to_do'
,
'='
,
0
],
[
'id'
,
'in'
,
list
(
makeups_to_come_per_partner
.
keys
())]]
cond
=
[[
'makeups_to_do'
,
'='
,
0
],
[
'id'
,
'in'
,
list
(
makeups_to_come_per_partner
.
keys
())]]
...
...
shifts/models.py
View file @
659ede3e
...
@@ -185,7 +185,7 @@ class CagetteShift(models.Model):
...
@@ -185,7 +185,7 @@ class CagetteShift(models.Model):
shiftData
=
self
.
o_api
.
search_read
(
'shift.registration'
,
cond
,
fields
,
order
=
"date_begin ASC"
)
shiftData
=
self
.
o_api
.
search_read
(
'shift.registration'
,
cond
,
fields
,
order
=
"date_begin ASC"
)
return
shiftData
return
shiftData
def
get_
count_of_makeups_to_come_per_partner
(
self
):
def
get_
partners_with_makeups_to_come
(
self
):
"""Returns a dictionary with : keys = the partners ids having at least one makeup to come ; values = #makeups_to_come"""
"""Returns a dictionary with : keys = the partners ids having at least one makeup to come ; values = #makeups_to_come"""
fields
=
[
'partner_id'
]
fields
=
[
'partner_id'
]
cond
=
[[
'state'
,
'='
,
'open'
],
[
'date_begin'
,
'>'
,
datetime
.
datetime
.
now
()
.
isoformat
()],
[
'is_makeup'
,
'='
,
True
]]
cond
=
[[
'state'
,
'='
,
'open'
],
[
'date_begin'
,
'>'
,
datetime
.
datetime
.
now
()
.
isoformat
()],
[
'is_makeup'
,
'='
,
True
]]
...
...
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