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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
217a9d73
Commit
217a9d73
authored
May 13, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not compensate SM with quantity=0 and set quantity=0 on built but not-frozen SM to delete
parent
0ebd4581
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
product/ERP5/mixin/rule.py
product/ERP5/mixin/rule.py
+11
-6
No files found.
product/ERP5/mixin/rule.py
View file @
217a9d73
...
@@ -365,12 +365,17 @@ class RuleMixin(Predicate):
...
@@ -365,12 +365,17 @@ class RuleMixin(Predicate):
if
decision_movement
.
isDeletable
():
if
decision_movement
.
isDeletable
():
# Delete deletable
# Delete deletable
movement_collection_diff
.
addDeletableMovement
(
decision_movement
)
movement_collection_diff
.
addDeletableMovement
(
decision_movement
)
else
:
continue
# Compensate non deletable
quantity
=
decision_movement
.
getQuantity
()
new_movement
=
decision_movement
.
asContext
(
if
quantity
:
quantity
=-
decision_movement
.
getQuantity
())
if
decision_movement
.
isFrozen
():
# Compensate
new_movement
=
decision_movement
.
asContext
(
quantity
=-
quantity
)
new_movement
.
setDelivery
(
None
)
new_movement
.
setDelivery
(
None
)
movement_collection_diff
.
addNewMovement
(
new_movement
)
movement_collection_diff
.
addNewMovement
(
new_movement
)
else
:
movement_collection_diff
.
addUpdatableMovement
(
decision_movement
,
{
'quantity'
:
0
})
return
return
# Case 2: movements which should be added
# Case 2: movements which should be added
...
...
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