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