Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
70c169c1
Commit
70c169c1
authored
Apr 23, 2020
by
Xiaowu Zhang
Committed by
Cédric Le Ninivin
Feb 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RuleMixin: Don't compensate on frozen if quantity is 0
parent
1422a7bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.RuleMixin.py
...xinTemplateItem/portal_components/mixin.erp5.RuleMixin.py
+3
-0
No files found.
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.RuleMixin.py
View file @
70c169c1
...
@@ -342,6 +342,9 @@ class RuleMixin(Predicate):
...
@@ -342,6 +342,9 @@ class RuleMixin(Predicate):
if
decision_movement
.
isFrozen
():
if
decision_movement
.
isFrozen
():
# Frozen must be compensated
# Frozen must be compensated
if
not
_compare
(
divergence_tester_list
,
prevision_movement
,
decision_movement
):
if
not
_compare
(
divergence_tester_list
,
prevision_movement
,
decision_movement
):
if
not
decision_movement_quantity
:
# We don't compensate if compensated quantity is 0
continue
new_movement
=
decision_movement
.
asContext
(
new_movement
=
decision_movement
.
asContext
(
quantity
=-
decision_movement_quantity
)
quantity
=-
decision_movement_quantity
)
new_movement
.
setDelivery
(
None
)
new_movement
.
setDelivery
(
None
)
...
...
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