Commit ed5a6983 authored by Sebastien Robin's avatar Sebastien Robin

allow to define a transformation on the production order line

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3962 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c2006b85
......@@ -269,8 +269,12 @@ class TransformationRule(Rule):
production_order_line = production_order_movement
else:
production_order_line = production_order_movement.getParent()
transformation = production_order_line.getSpecialiseValue(
portal_type=self.getPortalTransformationTypeList())
line_transformation = production_order_line.objectValues(portal_type=self.getPortalTransformationTypeList())
if len(line_transformation)==1:
transformation = line_transformation[0]
else:
transformation = production_order_line.getSpecialiseValue(
portal_type=self.getPortalTransformationTypeList())
# Generate the fake context
tmp_context = parent_movement.asContext(
context=parent_movement,
......
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