diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml index 97ec78c2dda4875dc680f93e0162fb09a83e125b..35555088b2d737f72adbb839c90039d11ef6264b 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml @@ -101,27 +101,32 @@ if transaction.getTotalPrice(portal_type = \'Check Operation Line\') != transact for check_operation_line in transaction.contentValues(filter = {\'portal_type\' : \'Check Operation Line\'}):\n check_number = check_operation_line.getAggregateFreeText()\n if not check_number:\n - msg = Message(domain=\'ui\', message=\'Check is not defined.\')\n + msg = Message(domain=\'ui\', message=\'Check is not defined on line $line.\'\n + , mapping={"line" : line.getId()})\n raise ValidationFailed, (msg,)\n \n check_type = check_operation_line.getAggregateResource()\n if check_type is None:\n - msg = Message(domain=\'ui\', message=\'Check type is not defined.\')\n + msg = Message(domain=\'ui\', message=\'Check type is not defined on line $line.\'\n + , mapping={"line" : line.getId()})\n raise ValidationFailed, (msg,)\n \n \n source_bank_account = check_operation_line.getSourcePaymentValue()\n if source_bank_account is None:\n - msg = Message(domain=\'ui\', message=\'Source bank account not defined.\')\n + msg = Message(domain=\'ui\', message=\'Bank account not defined on line $line.\'\n + , mapping={"line" : line.getId()})\n raise ValidationFailed, (msg,)\n \n # Test if the account balance is sufficient.\n error = context.BankAccount_checkBalance(source_bank_account.getRelativeUrl(), check_operation_line.getPrice())\n if error[\'error_code\'] == 1:\n - msg = Message(domain=\'ui\', message="Source bank account is not sufficient.")\n + msg = Message(domain=\'ui\', message="Bank account $account is not sufficient on line $line.",\n + mapping={"account": source_bank_account.getInternalBankAccountNumber, "line" : line.getId()})\n raise ValidationFailed, (msg,)\n elif error[\'error_code\'] == 2:\n - msg = Message(domain=\'ui\', message="source bank account is not valid.")\n + msg = Message(domain=\'ui\', message="Bank account $account is not valid on $line.",\n + mapping={"account": source_bank_account.getInternalBankAccountNumber, "line" : line.getId()})\n raise ValidationFailed, (msg,)\n elif error[\'error_code\'] != 0:\n msg = Message(domain=\'ui\', message="Unknown error code.")\n @@ -209,6 +214,7 @@ if transaction.getSimulationState() == "draft":\n <string>_getiter_</string> <string>check_operation_line</string> <string>check_number</string> + <string>line</string> <string>check_type</string> <string>source_bank_account</string> <string>context</string> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/states/ordered.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/states/ordered.xml index a0a73af9df0bae0170c76b71c2d40bc603fb056b..207778c327111edbb83ac7c8712719716cda6395 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/states/ordered.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/states/ordered.xml @@ -43,8 +43,6 @@ <key> <string>transitions</string> </key> <value> <tuple> - <string>cancel</string> - <string>cancel_action</string> <string>deliver</string> <string>deliver_action</string> <string>reject</string> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/states/waiting.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/states/waiting.xml index f108af0f10acd5f4b6f783e79db47b42e5169449..ffba1b7501e750b487efd457577a2b8e60688802 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/states/waiting.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/states/waiting.xml @@ -45,10 +45,8 @@ <tuple> <string>accept</string> <string>accept_action</string> - <string>cancel</string> - <string>cancel_action</string> + <string>refuse_action</string> <string>reject</string> - <string>reject_action</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/accept_action.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/accept_action.xml index 91499f986fa55b9182b6675dfe1af47cc59a0e81..4e846f6c5eb6a0abfb9af024476e06d9f802f97f 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/accept_action.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/accept_action.xml @@ -84,7 +84,6 @@ <value> <tuple> <string>Manager</string> - <string>DestinationAssignor</string> <string>DestinationAssignee</string> </tuple> </value> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/refuse_action.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/refuse_action.xml new file mode 100644 index 0000000000000000000000000000000000000000..2e8e7b00b70d82d09ad20e3cfdc71ffe71593552 --- /dev/null +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/refuse_action.xml @@ -0,0 +1,94 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_owner</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>Reject</string> </value> + </item> + <item> + <key> <string>actbox_url</string> </key> + <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?field_my_workflow_action=refuse_action</string> </value> + </item> + <item> + <key> <string>after_script_name</string> </key> + <value> <string>reject</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>refuse_action</string> </value> + </item> + <item> + <key> <string>new_state_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Refuse Action</string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Guard" module="Products.DCWorkflow.Guard"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>roles</string> </key> + <value> + <tuple> + <string>Manager</string> + <string>DestinationAssignee</string> + </tuple> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/reject_action.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/reject_action.xml index 68310c5da4d10247cd6a9835722802ee960182d1..61096e6b8ee352b6b913a544b76240ae2e810dcd 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/reject_action.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/transitions/reject_action.xml @@ -80,7 +80,6 @@ <string>Manager</string> <string>Assignee</string> <string>DestinationAssignor</string> - <string>DestinationAssignee</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_check/bt/revision b/bt5/erp5_banking_check/bt/revision index 27b4d6e6bacedf3dda2b50f2678f77fb5e0ec214..2d828461b6912dc00f044b46a61b4336403c56f4 100644 --- a/bt5/erp5_banking_check/bt/revision +++ b/bt5/erp5_banking_check/bt/revision @@ -1 +1 @@ -287 \ No newline at end of file +289 \ No newline at end of file