From 356e5a33abe27c0595a21c714d5d5f616a5faedb Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Wed, 7 Sep 2016 11:30:57 +0200 Subject: [PATCH] mrp: it was bad idea to set transformation on line if several transformations are found Some tests where explicitely checking that transformation is not set in case several are found. It is indeed better to ask user decision in such case. --- .../ProductionOrderLine_setTransformationFromResource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.py b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.py index 70c8c34408..0ce73fa37b 100644 --- a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.py +++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.py @@ -11,6 +11,6 @@ if transformation is None: portal_type=portal.getPortalTransformationTypeList(), validation_state="!=invalidated", default_resource_uid=resource_uid) - if len(transformation_list) >= 1: + if len(transformation_list) == 1: transformation = transformation_list[0].getRelativeUrl() production_order_line.setSpecialise(transformation) -- 2.30.9