diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow.xml b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow.xml new file mode 100644 index 0000000000000000000000000000000000000000..5a3d1af47bfd0969f40910d30eb1ce8cee6ab142 --- /dev/null +++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow.xml @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>transformation_interaction_workflow</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/interactions.xml b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/interactions.xml new file mode 100644 index 0000000000000000000000000000000000000000..879a78b540f5742c1dc5bb51265c562252bdf194 --- /dev/null +++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/interactions.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Interaction" module="Products.ERP5.Interaction"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>interactions</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/interactions/ProductionOrderLine_setResource.xml b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/interactions/ProductionOrderLine_setResource.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f957b96103b343c161c943b150d40571c23d9eb --- /dev/null +++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/interactions/ProductionOrderLine_setResource.xml @@ -0,0 +1,95 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="InteractionDefinition" module="Products.ERP5.Interaction"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>actbox_category</string> </key> + <value> <string>workflow</string> </value> + </item> + <item> + <key> <string>actbox_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>actbox_url</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>activate_script_name</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>after_script_name</string> </key> + <value> + <list> + <string>ProductionOrderLine_setTransformationFromResource</string> + </list> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Setting the resource will set best, if found, transformation related to this resource on movement.</string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ProductionOrderLine_setResource</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <string>_setResource.*</string> + </list> + </value> + </item> + <item> + <key> <string>once_per_transaction</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>portal_type_filter</string> </key> + <value> + <list> + <string>Production Order Line</string> + </list> + </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>2</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/scripts.xml b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/scripts.xml new file mode 100644 index 0000000000000000000000000000000000000000..66683dde0451b4de3eeb20f0fe5c7af60083c8a8 --- /dev/null +++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/scripts.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Scripts" module="Products.DCWorkflow.Scripts"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>scripts</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml new file mode 100644 index 0000000000000000000000000000000000000000..6608f554b6a50a6522c2fce0a91a41ff2497ed43 --- /dev/null +++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml @@ -0,0 +1,160 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>production_order_line = state_change[\'object\']\n +\n +transformation = None\n +resource = production_order_line.getResourceValue()\n +if resource is not None:\n + transformation_list = [q for q in resource.getResourceRelatedValueList(portal_type=\'Transformation\') \\\n + if q.getProperty(\'validation_state\',\'default\') != \'invalidated\']\n + if len(transformation_list) == 1:\n + transformation = transformation_list[0].getRelativeUrl()\n +production_order_line.setSpecialise(transformation)\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>state_change</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>state_change</string> + <string>_getitem_</string> + <string>production_order_line</string> + <string>None</string> + <string>transformation</string> + <string>_getattr_</string> + <string>resource</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>q</string> + <string>transformation_list</string> + <string>len</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ProductionOrderLine_setTransformationFromResource</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/variables.xml b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/variables.xml new file mode 100644 index 0000000000000000000000000000000000000000..733d9ce458eebdbf2f511e03ef3d0831d9587ce9 --- /dev/null +++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/variables.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Variables" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>variables</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/worklists.xml b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/worklists.xml new file mode 100644 index 0000000000000000000000000000000000000000..3953ad0209bd0cd9a4f7c91ba6db81eebb08acfc --- /dev/null +++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/transformation_interaction_workflow/worklists.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Worklists" module="Products.DCWorkflow.Worklists"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>worklists</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/bt/revision b/bt5/erp5_mrp/bt/revision index 27b4d6e6bacedf3dda2b50f2678f77fb5e0ec214..6eac4a65cde9135c747b7d858a570e928a1f7b5d 100644 --- a/bt5/erp5_mrp/bt/revision +++ b/bt5/erp5_mrp/bt/revision @@ -1 +1 @@ -287 \ No newline at end of file +292 \ No newline at end of file diff --git a/bt5/erp5_mrp/bt/template_workflow_id_list b/bt5/erp5_mrp/bt/template_workflow_id_list index e3af034423df17f4054efa456f500bcb4f87c1ef..77b0e283449a0a3bd725f46cf7bd003a5af6dba8 100644 --- a/bt5/erp5_mrp/bt/template_workflow_id_list +++ b/bt5/erp5_mrp/bt/template_workflow_id_list @@ -1,4 +1,5 @@ production_matrix_workflow production_order_workflow production_packing_list_causality_workflow -production_packing_list_workflow \ No newline at end of file +production_packing_list_workflow +transformation_interaction_workflow \ No newline at end of file