Commit d47c0d82 authored by Arnaud Fontaine's avatar Arnaud Fontaine

newTemp*() deprecation (1bce8563, 04b49859): Fix newDeliverySolver().

parent d81abd3d
...@@ -65,12 +65,9 @@ class SolverTool(TypeProvider): ...@@ -65,12 +65,9 @@ class SolverTool(TypeProvider):
movement_list -- movements to initialise the instance with movement_list -- movements to initialise the instance with
""" """
solver_type = self._getOb(portal_type) tmp_solver = self.newContent(portal_type=portal_type,
solver_class = re.sub('^add', 'newTemp', temp_object=True,
solver_type.getTypeFactoryMethodId()) id='delivery_solver')
module = __import__('Products.ERP5Type.Document', globals(), locals(),
[solver_class])
tmp_solver = getattr(module, solver_class)(self, 'delivery_solver')
tmp_solver.setDeliveryValueList(movement_list) tmp_solver.setDeliveryValueList(movement_list)
return tmp_solver return tmp_solver
......
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