diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/SimulationMovement_testTransformationRule.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/SimulationMovement_testTransformationRule.xml index 116e6e375201b5d84411e7de321fd962cc0ed589..e2c4a7391e316afa225ff114a675c5c8741d7900 100644 --- a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/SimulationMovement_testTransformationRule.xml +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/SimulationMovement_testTransformationRule.xml @@ -72,12 +72,14 @@ root_movement = movement.getRootSimulationMovement()\n \n # Test movement\n if (root_rule is None or\n - root_rule.getPortalType() != "Production Order Rule" or\n + root_rule.getPortalType() not in ("Production Order Rule", "Production Order Simulation Rule") or\n order is None or\n movement.getResourceValue() is None or\n movement.getSourceValue() is None or\n - movement.getResourceValue() != root_movement.getResourceValue() or\n - movement.getPath() == root_movement.getPath()):\n + movement.getResourceValue() != root_movement.getResourceValue()):\n + return False\n +if root_rule.getPortalType() in ("Production Order Simulation Rule",) and\\\n + movement.getPath() == root_movement.getPath():\n return False\n \n supply_chain = rule.getSupplyChain(movement.getParentValue())\n diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_selectMovement.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_selectMovement.xml index b850d7a3d8c5e5bc5cd5a5d9ddae505a6e2be19c..a201465c15550a6ea37aafc20a19d5a0e06c29f4 100644 --- a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_selectMovement.xml +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_selectMovement.xml @@ -60,9 +60,11 @@ parent_applied_rule = movement.getParentValue()\n parent_rule = parent_applied_rule.getSpecialiseValue()\n return (\n - root_rule.getPortalType() == "Production Order Rule" and\\\n - (parent_rule.getPortalType() in ("Transformation Sourcing Rule",\n - "Delivering Rule")) and\\\n + ((root_rule.getPortalType() == "Production Order Rule" and\\\n + (parent_rule.getPortalType() in ("Transformation Sourcing Rule",))) or \\\n + (root_rule.getPortalType() == "Production Order Simulation Rule" and\\\n + (parent_rule.getPortalType() in ("Delivering Simulation Rule",))))\\\n + and\\\n root_movement.getSimulationState() == "confirmed"\n )\n \n diff --git a/bt5/erp5_mrp/bt/revision b/bt5/erp5_mrp/bt/revision index 5e801cee880d1bdf4d33a876b8bb09b3d231da22..e04c4148a6f9ea9fe09db8e80e7f760c324cc3d0 100644 --- a/bt5/erp5_mrp/bt/revision +++ b/bt5/erp5_mrp/bt/revision @@ -1 +1 @@ -416 \ No newline at end of file +417 \ No newline at end of file