From 7eb29e5b47f3325b01385d16c54f08aa5d0f22c2 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Tue, 12 Jan 2010 12:10:56 +0000 Subject: [PATCH] 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 --- product/ERP5/Document/QuantitySplitSolver.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/product/ERP5/Document/QuantitySplitSolver.py b/product/ERP5/Document/QuantitySplitSolver.py index c142bacf07..72b9081255 100644 --- a/product/ERP5/Document/QuantitySplitSolver.py +++ b/product/ERP5/Document/QuantitySplitSolver.py @@ -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() -- 2.30.9