Commit a5ee246e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

do not raise an exception if start_date and/or stop_date is omitted.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34772 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b58e755c
...@@ -104,10 +104,14 @@ class SplitAndDefer(CopyToTarget): ...@@ -104,10 +104,14 @@ class SplitAndDefer(CopyToTarget):
movement_dict.update(**{ movement_dict.update(**{
prop: simulation_movement.getProperty(prop)}) prop: simulation_movement.getProperty(prop)})
new_movement = applied_rule.newContent(**movement_dict) new_movement = applied_rule.newContent(**movement_dict)
start_date = getattr(self, 'start_date', None)
if start_date is not None:
new_movement.recordProperty('start_date') new_movement.recordProperty('start_date')
new_movement.edit(start_date=start_date)
stop_date = getattr(self, 'stop_date', None)
if stop_date is not None:
new_movement.recordProperty('stop_date') new_movement.recordProperty('stop_date')
new_movement.edit(start_date=self.start_date, new_movement.edit(stop_date=stop_date)
stop_date=self.stop_date)
new_movement.activate(**self.additional_parameters).expand() new_movement.activate(**self.additional_parameters).expand()
# adopt new quantity on original simulation movement # adopt new quantity on original simulation movement
simulation_movement.edit(quantity=new_movement_quantity) simulation_movement.edit(quantity=new_movement_quantity)
......
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