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
cb6a66fe
Commit
cb6a66fe
authored
Dec 15, 2021
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix standard point added if shift is moved using members_space interface
parent
b88b0203
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
models.py
shifts/models.py
+3
-1
No files found.
shifts/models.py
View file @
cb6a66fe
...
@@ -155,6 +155,8 @@ class CagetteShift(models.Model):
...
@@ -155,6 +155,8 @@ class CagetteShift(models.Model):
"origin"
:
'memberspace'
,
"origin"
:
'memberspace'
,
"is_makeup"
:
data
[
'is_makeup'
],
"is_makeup"
:
data
[
'is_makeup'
],
"state"
:
'open'
}
"state"
:
'open'
}
if
shift_type
==
"standard"
:
fieldsDatas
[
'template_created'
]
=
1
# It's not true but otherwise, presence add 1 standard point, which is not wanted
st_r_id
=
self
.
o_api
.
create
(
'shift.registration'
,
fieldsDatas
)
st_r_id
=
self
.
o_api
.
create
(
'shift.registration'
,
fieldsDatas
)
except
Exception
as
e
:
except
Exception
as
e
:
...
@@ -211,7 +213,7 @@ class CagetteShift(models.Model):
...
@@ -211,7 +213,7 @@ class CagetteShift(models.Model):
action
=
'create'
action
=
'create'
# Get partner extension ids
# Get partner extension ids
cond
=
[[
'id'
,
'='
,
data
[
'idPartner'
]]]
cond
=
[[
'id'
,
'='
,
data
[
'idPartner'
]]]
fields
=
[
'extension_ids'
]
fields
=
[
'extension_ids'
]
partner_extensions
=
self
.
o_api
.
search_read
(
'res.partner'
,
cond
,
fields
)
partner_extensions
=
self
.
o_api
.
search_read
(
'res.partner'
,
cond
,
fields
)
response
=
False
response
=
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