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
261f5acd
Commit
261f5acd
authored
Jan 22, 2025
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use list instead of one id as there may be several shift_templates associated to one res_partner
parent
dfbddd07
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
models.py
members/models.py
+5
-5
No files found.
members/models.py
View file @
261f5acd
...
@@ -1088,17 +1088,17 @@ class CagetteMember(models.Model):
...
@@ -1088,17 +1088,17 @@ class CagetteMember(models.Model):
return
makeup_reg_ids
return
makeup_reg_ids
def
get_shift_template_registration_id
(
self
):
def
get_shift_template_registration_id
s
(
self
):
c
=
[[
'partner_id'
,
'='
,
self
.
id
]
,
[
'active'
,
'='
,
True
]
]
c
=
[[
'partner_id'
,
'='
,
self
.
id
]]
f
=
[
'id'
]
f
=
[
'id'
]
return
self
.
o_api
.
search_read
(
"shift.template.registration"
,
c
,
f
)
[
0
][
'id'
]
return
self
.
o_api
.
search_read
(
"shift.template.registration"
,
c
,
f
)
def
unsubscribe_member_but_exogenous_makeups
(
self
):
def
unsubscribe_member_but_exogenous_makeups
(
self
):
return
self
.
o_api
.
execute
(
return
self
.
o_api
.
execute
(
'shift.template.registration'
,
'shift.template.registration'
,
'unlink_but_exogenous_makeups'
,
'unlink_but_exogenous_makeups'
,
[
self
.
get_shift_template_registration_id
()]
[
self
.
get_shift_template_registration_id
s
()]
)
)
...
@@ -1106,7 +1106,7 @@ class CagetteMember(models.Model):
...
@@ -1106,7 +1106,7 @@ class CagetteMember(models.Model):
return
self
.
o_api
.
execute
(
return
self
.
o_api
.
execute
(
'shift.template.registration'
,
'shift.template.registration'
,
'unlink'
,
'unlink'
,
[
self
.
get_shift_template_registration_id
()]
[
self
.
get_shift_template_registration_id
s
()]
)
)
...
...
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