Commit 7eb29e5b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

a new simulation movement made by split solver should store original...

a new simulation movement made by split solver should store original start_date and/or stop_date in recorded property, otherwise next expand will not work correctly.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31706 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bef70976
......@@ -81,13 +81,15 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
kw.update({'portal_type':simulation_movement.getPortalType(),
'delivery':None,
'quantity':split_quantity})
new_movement = simulation_movement.getParentValue().newContent(**kw)
start_date = configuration_dict.get('start_date', None)
if start_date is not None:
kw['start_date'] = start_date
new_movement.recordProperty('start_date')
new_movement.setStartDate(start_date)
stop_date = configuration_dict.get('stop_date', None)
if stop_date is not None:
kw['stop_date'] = stop_date
new_movement = simulation_movement.getParentValue().newContent(**kw)
new_movement.recordProperty('stop_date')
new_movement.setStopDate(stop_date)
# Finish solving
self.succeed()
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