Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odoo
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
0
Merge Requests
0
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
odoo
Commits
7143b801
Commit
7143b801
authored
Oct 26, 2021
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX unset target_status bug
parent
6b8faccc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
shift_counter_event.py
...addons/lacagette_membership/models/shift_counter_event.py
+3
-1
No files found.
lacagette_addons/lacagette_membership/models/shift_counter_event.py
View file @
7143b801
...
@@ -20,14 +20,16 @@ class ShiftCounterEvent(models.Model):
...
@@ -20,14 +20,16 @@ class ShiftCounterEvent(models.Model):
p
=
res_partner
[
0
]
p
=
res_partner
[
0
]
points_before_removing_points
=
p
.
final_ftop_point
if
p
.
shift_type
==
"ftop"
else
p
.
final_standard_point
points_before_removing_points
=
p
.
final_ftop_point
if
p
.
shift_type
==
"ftop"
else
p
.
final_standard_point
points_after_removal
=
points_before_removing_points
+
vals
[
'point_qty'
]
points_after_removal
=
points_before_removing_points
+
vals
[
'point_qty'
]
_logger
.
info
(
"points_after_removal =
%
s
"
,
str
(
points_after_removal
)
)
_logger
.
info
(
"points_after_removal =
%
s
, current_state =
%
s"
,
str
(
points_after_removal
),
p
.
cooperative_state
)
if
points_after_removal
<=
suspension_limit
or
points_after_removal
<=
unsubscribe_limit
:
if
points_after_removal
<=
suspension_limit
or
points_after_removal
<=
unsubscribe_limit
:
target_status
=
None
if
(
points_after_removal
<=
suspension_limit
if
(
points_after_removal
<=
suspension_limit
and
and
p
.
cooperative_state
!=
'delay'
):
p
.
cooperative_state
!=
'delay'
):
target_status
=
'suspended'
target_status
=
'suspended'
if
points_after_removal
<=
unsubscribe_limit
:
if
points_after_removal
<=
unsubscribe_limit
:
target_status
=
'unsubscribed'
target_status
=
'unsubscribed'
if
target_status
is
not
None
:
p
.
update
({
'target_status'
:
target_status
,
p
.
update
({
'target_status'
:
target_status
,
'current_cooperative_state'
:
p
.
cooperative_state
})
'current_cooperative_state'
:
p
.
cooperative_state
})
...
...
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