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
6963f5a9
Commit
6963f5a9
authored
Mar 11, 2025
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '7800-make-test-solution-work' into migration-v12
parents
972db44b
ab301bb2
Pipeline
#4174
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
models.py
shifts/models.py
+11
-3
No files found.
shifts/models.py
View file @
6963f5a9
...
@@ -912,12 +912,20 @@ class CagetteService(models.Model):
...
@@ -912,12 +912,20 @@ class CagetteService(models.Model):
partner_ids
.
append
(
int
(
r
[
'partner_id'
][
0
]))
partner_ids
.
append
(
int
(
r
[
'partner_id'
][
0
]))
#TODO : improve name of following method
#TODO : improve name of following method
canceled_reg_ids
,
excluded_partner
,
ids
=
CagetteServices
.
fetch_registrations_infos_excluding_exempted_people
(
canceled_reg_ids
,
excluded_partner
,
ids
=
CagetteServices
.
fetch_registrations_infos_excluding_exempted_people
(
api
,
partner_ids
,
res
self
.
o_
api
,
partner_ids
,
res
)
)
f
=
{
'state'
:
absence_status
,
'date_closed'
:
now
.
isoformat
()}
f
=
{
'state'
:
absence_status
,
'date_closed'
:
now
.
isoformat
()}
update_shift_reg_result
=
{
'update'
:
self
.
o_api
.
update
(
'shift.registration'
,
ids
,
f
),
'reg_shift'
:
res
,
'errors'
:
[]}
try
:
update_shift_reg_result
=
{
'update'
:
self
.
o_api
.
update
(
'shift.registration'
,
ids
,
f
),
'reg_shift'
:
res
,
'errors'
:
[]}
except
Exception
as
e
:
if
not
(
"cannot marshal"
in
str
(
e
)):
raise
e
else
:
update_shift_reg_result
=
{
'update'
:
True
,
'reg_shift'
:
None
,
'errors'
:
[]}
if
update_shift_reg_result
[
'update'
]
is
True
:
if
update_shift_reg_result
[
'update'
]
is
True
:
update_shift_reg_result
[
'process_status_res'
]
=
self
.
o_api
.
execute
(
'res.partner'
,
'run_process_target_status'
,
[])
# With new way of overriding awesomefoodcoop status management, the following line is no more useful
# update_shift_reg_result['process_status_res'] = self.o_api.execute('res.partner','run_process_target_status', [])
# change shift state by triggering button_done method for all related shifts
# change shift state by triggering button_done method for all related shifts
if
len
(
canceled_reg_ids
)
>
0
:
if
len
(
canceled_reg_ids
)
>
0
:
f
=
{
'state'
:
'cancel'
,
'date_closed'
:
now
.
isoformat
()}
f
=
{
'state'
:
'cancel'
,
'date_closed'
:
now
.
isoformat
()}
...
...
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