diff --git a/bt5/erp5_banking_cash/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml b/bt5/erp5_banking_cash/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml index 37aaeeca4a550b886dfb1b842699ae6a9766ea6c..994c2beae32f4f93ec9719f0c583757742434f15 100644 --- a/bt5/erp5_banking_cash/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml +++ b/bt5/erp5_banking_cash/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml @@ -13,7 +13,7 @@ </chain> <chain> <type>Cash Incident</type> - <workflow>edit_workflow, cash_incident_workflow</workflow> + <workflow>cash_incident_currency_interaction_workflow, edit_workflow, cash_incident_workflow</workflow> </chain> <chain> <type>Cash Movement</type> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_viewIncomingLineFastInputDialog.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_viewIncomingLineFastInputDialog.xml index 45d9e9ea7df3e880471a89640e9721418f59da49..0de40d848a743fba3f6522f8d145d95e26e0d9c2 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_viewIncomingLineFastInputDialog.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_viewIncomingLineFastInputDialog.xml @@ -66,9 +66,16 @@ <item> <key> <string>_body</string> </key> <value> <string>request = context.REQUEST\n +currency = context.getResourceId()\n +if currency is None :\n + redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n + , \'view\'\n + , \'portal_status_message=Please+select+a+vault.\'\n + )\n + return request.RESPONSE.redirect( redirect_url )\n \n cash_detail_dict = {\'line_portal_type\' : \'Incoming Account Incident Line\'\n - , \'operation_currency\' : context.getResourceId()\n + , \'operation_currency\' : currency\n , \'cash_status_list\' : None\n , \'emission_letter_list\' : None\n , \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1, coin=1)\n @@ -132,7 +139,9 @@ return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n <string>_getattr_</string> <string>context</string> <string>request</string> + <string>currency</string> <string>None</string> + <string>redirect_url</string> <string>False</string> <string>cash_detail_dict</string> </tuple> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_viewOutgoingLineFastInputDialog.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_viewOutgoingLineFastInputDialog.xml index f06356db15545d9e58a5742ebbc8ec21083c06c2..04e4c0a9ba1310f731a6f20148a73fb3e5b8dac5 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_viewOutgoingLineFastInputDialog.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_viewOutgoingLineFastInputDialog.xml @@ -66,9 +66,16 @@ <item> <key> <string>_body</string> </key> <value> <string>request = context.REQUEST\n +currency = context.getResourceId()\n +if currency is None :\n + redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n + , \'view\'\n + , \'portal_status_message=Please+select+a+vault.\'\n + )\n + return request.RESPONSE.redirect( redirect_url )\n \n cash_detail_dict = {\'line_portal_type\' : \'Outgoing Account Incident Line\'\n - , \'operation_currency\' : context.getResourceId()\n + , \'operation_currency\' : currency\n , \'cash_status_list\' : [\'valid\',\'new_emitted\']\n , \'emission_letter_list\' : None\n , \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1, coin=1)\n @@ -132,7 +139,9 @@ return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n <string>_getattr_</string> <string>context</string> <string>request</string> + <string>currency</string> <string>None</string> + <string>redirect_url</string> <string>False</string> <string>cash_detail_dict</string> </tuple> diff --git a/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow.xml new file mode 100644 index 0000000000000000000000000000000000000000..55fa56bbb26b7d17af3bf262b414ea071193f393 --- /dev/null +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_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>cash_incident_currency_interaction_workflow</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/interactions.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/interactions.xml new file mode 100644 index 0000000000000000000000000000000000000000..879a78b540f5742c1dc5bb51265c562252bdf194 --- /dev/null +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_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_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/interactions/updateCurrency.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/interactions/updateCurrency.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee31099ed4af0fd071137ac8d849e3944cfb2e85 --- /dev/null +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/interactions/updateCurrency.xml @@ -0,0 +1,91 @@ +<?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>Document_updateCurrency</string> + </list> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>updateCurrency</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <string>_setSource</string> + </list> + </value> + </item> + <item> + <key> <string>portal_type_filter</string> </key> + <value> + <list> + <string>Cash Incident</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_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/scripts.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/scripts.xml new file mode 100644 index 0000000000000000000000000000000000000000..66683dde0451b4de3eeb20f0fe5c7af60083c8a8 --- /dev/null +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_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_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/scripts/Document_updateCurrency.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/scripts/Document_updateCurrency.xml new file mode 100644 index 0000000000000000000000000000000000000000..9290e26ad3bbaa49a8a97fc870d990ad8d16a2b8 --- /dev/null +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/scripts/Document_updateCurrency.xml @@ -0,0 +1,156 @@ +<?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>obj = state_change[\'object\']\n +\n +source = obj.getSource()\n +if source is not None:\n + currency = obj.Baobab_getVaultCurrency(vault=source)\n + obj.setResource(currency)\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>_proxy_roles</string> </key> + <value> + <tuple/> + </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>obj</string> + <string>_getattr_</string> + <string>source</string> + <string>None</string> + <string>currency</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>Document_updateCurrency</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/variables.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/variables.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d9ea0fae8df235f1290022d3cb37eaf4a947ade --- /dev/null +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/variables.xml @@ -0,0 +1,37 @@ +<?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>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>variables</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/variables/portal_type.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/variables/portal_type.xml new file mode 100644 index 0000000000000000000000000000000000000000..96414aee009b30ae6495d39f108064a5be1c0ac8 --- /dev/null +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/variables/portal_type.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="VariableDefinition" module="Products.DCWorkflow.Variables"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>portal_type</string> </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/worklists.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_interaction_workflow/worklists.xml new file mode 100644 index 0000000000000000000000000000000000000000..3953ad0209bd0cd9a4f7c91ba6db81eebb08acfc --- /dev/null +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_incident_currency_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_banking_cash/bt/revision b/bt5/erp5_banking_cash/bt/revision index f71beab75f5697f6169cfd1d9147fcee958c1038..eaea6f59715638e11200d8bdb771e0280f482354 100644 --- a/bt5/erp5_banking_cash/bt/revision +++ b/bt5/erp5_banking_cash/bt/revision @@ -1 +1 @@ -237 \ No newline at end of file +240 \ No newline at end of file diff --git a/bt5/erp5_banking_cash/bt/template_portal_type_workflow_chain_list b/bt5/erp5_banking_cash/bt/template_portal_type_workflow_chain_list index 110ecc3e63d0e451711ecec1e57e2dc6c534277a..ac003f6c6ae5aed404c67f5dce9ea6ada2709b71 100644 --- a/bt5/erp5_banking_cash/bt/template_portal_type_workflow_chain_list +++ b/bt5/erp5_banking_cash/bt/template_portal_type_workflow_chain_list @@ -4,6 +4,7 @@ Cash Balance Regulation | cash_balance_regulation_workflow Cash Balance Regulation | edit_workflow Cash Exchange | cash_exchange_workflow Cash Exchange | edit_workflow +Cash Incident | cash_incident_currency_interaction_workflow Cash Incident | cash_incident_workflow Cash Incident | edit_workflow Cash Movement | cash_movement_workflow diff --git a/bt5/erp5_banking_cash/bt/template_workflow_id_list b/bt5/erp5_banking_cash/bt/template_workflow_id_list index 8d3aa66ddaf93984de7f85ae1cba918bbd5d38cb..e24b3aa54a2971279fca302d3c21e7e956e2a3d2 100644 --- a/bt5/erp5_banking_cash/bt/template_workflow_id_list +++ b/bt5/erp5_banking_cash/bt/template_workflow_id_list @@ -1,6 +1,7 @@ account_incident_workflow cash_balance_regulation_workflow cash_exchange_workflow +cash_incident_currency_interaction_workflow cash_incident_workflow cash_movement_workflow cash_sorting_incident_workflow