From dfbb9450fdf6edf7a42b5a5d41cc972359bae475 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Fri, 6 Nov 2009 12:08:39 +0000 Subject: [PATCH] fix syntax error. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30367 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/SolverProcess.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/product/ERP5/Document/SolverProcess.py b/product/ERP5/Document/SolverProcess.py index 1a172b4433..9bb0c955c3 100644 --- a/product/ERP5/Document/SolverProcess.py +++ b/product/ERP5/Document/SolverProcess.py @@ -79,12 +79,12 @@ class SolverProcess(XMLObject, ActiveProcess): """ solver_dict = {} movement_dict = {} - types_tool = context.portal_types + types_tool = self.portal_types # First create a mapping between delivery movements and solvers # in order to know for each movements which solvers are needed # and which parameters with - for decision in context.contentValues(portal_type="Solver Decision"): + for decision in self.contentValues(portal_type="Solver Decision"): solver = decision.getSolverValue() solver_type = solver.getId() # ex. Postpone Production Solver solver_conviguration_dict = decision.getConfigurationPropertyDict() @@ -118,7 +118,7 @@ class SolverProcess(XMLObject, ActiveProcess): for solver_key, solver_movement_dict in solver_key_dict.items(): solver_instance = self.newContent(portal_type=solver_type) solver_instance._setDeliveryList(solver_movement_dict.keys()) - for movement_url, configuration_list: + for movement_url, configuration_list in solver_movement_dict.iteritems(): for configuration_kw in configuration_list: solver_instance.updateConfiguration(**configuration_kw) @@ -129,4 +129,4 @@ class SolverProcess(XMLObject, ActiveProcess): Start solving """ for solver in self.contentValues(portal_type=self.getPortalObject().getPortalTargetSolverTypeList()): - solver.activate(active_process=self).solve() \ No newline at end of file + solver.activate(active_process=self).solve() -- 2.30.9