diff --git a/bt5/erp5_trade/PathTemplateItem/portal_rules/default_delivery_rule.xml b/bt5/erp5_trade/PathTemplateItem/portal_rules/default_delivery_rule.xml index e5b63132168a78f6a194d64edd19d628aea7448c..2629cd3dfc44a44cffcc8dbf096b863049f61f62 100644 --- a/bt5/erp5_trade/PathTemplateItem/portal_rules/default_delivery_rule.xml +++ b/bt5/erp5_trade/PathTemplateItem/portal_rules/default_delivery_rule.xml @@ -39,6 +39,10 @@ <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> </value> </item> + <item> + <key> <string>default_reference</string> </key> + <value> <string>default_delivery_rule</string> </value> + </item> <item> <key> <string>id</string> </key> <value> <string>default_delivery_rule</string> </value> @@ -47,6 +51,14 @@ <key> <string>portal_type</string> </key> <value> <string>Delivery Rule</string> </value> </item> + <item> + <key> <string>test_method_id</string> </key> + <value> + <tuple> + <string>DeliveryRule_testContextPortalType</string> + </tuple> + </value> + </item> <item> <key> <string>title</string> </key> <value> <string>Default Delivery Rule</string> </value> @@ -57,6 +69,10 @@ <none/> </value> </item> + <item> + <key> <string>version</string> </key> + <value> <string>1</string> </value> + </item> </dictionary> </pickle> </record> diff --git a/bt5/erp5_trade/PathTemplateItem/portal_rules/default_order_rule.xml b/bt5/erp5_trade/PathTemplateItem/portal_rules/default_order_rule.xml index 1f55e7011254e69a61a65b33a7d84206ae7931ed..8bea35069e323842b66d1f83cebaf3a1f85bebf9 100644 --- a/bt5/erp5_trade/PathTemplateItem/portal_rules/default_order_rule.xml +++ b/bt5/erp5_trade/PathTemplateItem/portal_rules/default_order_rule.xml @@ -39,6 +39,10 @@ <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> </value> </item> + <item> + <key> <string>default_reference</string> </key> + <value> <string>default_order_rule</string> </value> + </item> <item> <key> <string>id</string> </key> <value> <string>default_order_rule</string> </value> @@ -47,6 +51,14 @@ <key> <string>portal_type</string> </key> <value> <string>Order Rule</string> </value> </item> + <item> + <key> <string>test_method_id</string> </key> + <value> + <tuple> + <string>OrderRule_testContextPortalType</string> + </tuple> + </value> + </item> <item> <key> <string>title</string> </key> <value> <string>Default Order Rule</string> </value> @@ -57,6 +69,10 @@ <none/> </value> </item> + <item> + <key> <string>version</string> </key> + <value> <string>1</string> </value> + </item> </dictionary> </pickle> </record> diff --git a/bt5/erp5_trade/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml b/bt5/erp5_trade/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml index 76602ed192a6261e627e2d48515220a4c1479386..0bf4276bfeeb4bf3f534fb65ebb91c2eaa2ccd1c 100644 --- a/bt5/erp5_trade/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml +++ b/bt5/erp5_trade/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml @@ -17,7 +17,7 @@ </chain> <chain> <type>Delivery Rule</type> - <workflow>edit_workflow</workflow> + <workflow>edit_workflow, rule_validation_workflow</workflow> </chain> <chain> <type>Discount</type> @@ -41,7 +41,7 @@ </chain> <chain> <type>Order Rule</type> - <workflow>edit_workflow</workflow> + <workflow>edit_workflow, rule_validation_workflow</workflow> </chain> <chain> <type>Payment Condition</type> diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/DeliveryRule_testContextPortalType.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/DeliveryRule_testContextPortalType.xml new file mode 100644 index 0000000000000000000000000000000000000000..f3bb2aac9fc5b7926231bf3756a23d078a10c729 --- /dev/null +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/DeliveryRule_testContextPortalType.xml @@ -0,0 +1,147 @@ +<?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>return context.getPortalType() in [\'Sale Packing List\']\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>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>rule</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>rule</string> + <string>_getattr_</string> + <string>context</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>DeliveryRule_testContextPortalType</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderRule_testContextPortalType.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderRule_testContextPortalType.xml new file mode 100644 index 0000000000000000000000000000000000000000..bf63e0abe53accfa9dc96a53afc30d493274708f --- /dev/null +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderRule_testContextPortalType.xml @@ -0,0 +1,147 @@ +<?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>return context.getPortalType() in [\'Sale Order\']\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>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>rule</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>rule</string> + <string>_getattr_</string> + <string>context</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>OrderRule_testContextPortalType</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision index b5db9c417a229cf02976899b74f8b6fc87712919..83248fb9df4a244c41a10fa536045d5a8e759aee 100644 --- a/bt5/erp5_trade/bt/revision +++ b/bt5/erp5_trade/bt/revision @@ -1 +1 @@ -139 \ No newline at end of file +142 \ No newline at end of file diff --git a/bt5/erp5_trade/bt/template_portal_type_workflow_chain_list b/bt5/erp5_trade/bt/template_portal_type_workflow_chain_list index 7bab95bbdcdf04cbcef8ea0869cc70441551c931..9826aaf7162afd062a7615786295cfde3151d021 100644 --- a/bt5/erp5_trade/bt/template_portal_type_workflow_chain_list +++ b/bt5/erp5_trade/bt/template_portal_type_workflow_chain_list @@ -9,6 +9,7 @@ Container | pricing_interaction_workflow Delivery Cell | delivery_movement_causality_interaction_workflow Delivery Cell | delivery_movement_simulation_interaction_workflow Delivery Rule | edit_workflow +Delivery Rule | rule_validation_workflow Discount | edit_workflow Internal Packing List Line | edit_workflow Internal Packing List Line | pricing_interaction_workflow @@ -21,6 +22,7 @@ Inventory Line | trade_matrix_workflow Inventory | edit_workflow Inventory | inventory_workflow Order Rule | edit_workflow +Order Rule | rule_validation_workflow Payment Condition | edit_workflow Purchase Order Cell | edit_workflow Purchase Order Cell | order_movement_simulation_interaction_workflow