Commit 1ab94666 authored by Yusei Tahara's avatar Yusei Tahara

Fix a bug. SplitAndDefer after AcceptDecison did not work.

parent edf83677
...@@ -74,6 +74,13 @@ class SplitAndDefer(CopyToTarget): ...@@ -74,6 +74,13 @@ class SplitAndDefer(CopyToTarget):
**self.additional_parameters **self.additional_parameters
) )
new_movement = applied_rule.newContent(**movement_dict) new_movement = applied_rule.newContent(**movement_dict)
# record zero quantity property, because this was originally zero.
# without this, splitanddefer after accept decision does not work
# properly.
current_quantity = new_movement.getQuantity()
new_movement.setQuantity(0)
new_movement.recordProperty('quantity')
new_movement.setQuantity(current_quantity)
start_date = getattr(self, 'start_date', None) start_date = getattr(self, 'start_date', None)
if start_date is not None: if start_date is not None:
new_movement.recordProperty('start_date') new_movement.recordProperty('start_date')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment