diff --git a/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGenerationActivity.xml b/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGenerationActivity.xml index 0f08fae61b46406c3a226d1a51ae4d6814cd752c..9a99c58e39de0c19c6e1f15a8b0b96fed130d2de 100644 --- a/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGenerationActivity.xml +++ b/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGenerationActivity.xml @@ -70,6 +70,7 @@ # after the invoice_builder delivery builder has created\n # the new Sale Invoice Transaction\n #\n +from Products.ERP5Type.Message import Message\n try:\n from Products.CMFCore.WorkflowCore import WorkflowException\n except ImportError:\n @@ -113,8 +114,8 @@ if not invoice.getTitle():\n if invoice.getSimulationState() == \'draft\':\n try :\n context.getPortalObject().portal_workflow.doActionFor(\n - invoice, \'plan_action\',\n - comment=\'Initialized by Delivery Builder\',\n + invoice, \'confirm_action\',\n + comment=Message(\'erp5_ui\', \'Initialized by Delivery Builder\'),\n skip_period_validation=1)\n except WorkflowException, e:\n # The user cannot pass the transition, it\'s OK\n @@ -122,7 +123,7 @@ if invoice.getSimulationState() == \'draft\':\n \n if invoice.getSimulationState() == \'draft\':\n # call the workflow method, if the user cannot perform this operation.\n - invoice.plan()\n + invoice.confirm()\n \n # First set the invoice in the building state on the causality workflow\n invoice.startBuilding()\n @@ -180,6 +181,8 @@ invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list <tuple> <string>related_simulation_movement_path_list</string> <string>kw</string> + <string>Products.ERP5Type.Message</string> + <string>Message</string> <string>Products.CMFCore.WorkflowCore</string> <string>WorkflowException</string> <string>ImportError</string> diff --git a/bt5/erp5_invoicing/bt/revision b/bt5/erp5_invoicing/bt/revision index f0b5c72cad2a31240e128db4bc833e782855f796..4800c7da68cf871d3228361b50e329df2115f8b7 100644 --- a/bt5/erp5_invoicing/bt/revision +++ b/bt5/erp5_invoicing/bt/revision @@ -1 +1 @@ -57 \ No newline at end of file +58 \ No newline at end of file