From 517766cac3b77318f8f3f374c1c439372050453c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Sat, 25 Nov 2006 11:56:04 +0000 Subject: [PATCH] activate a method on the module it self in AccountingTransactionModule_createRelatedPaymentTransactionList, so that the user can see when this task is finished git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11488 20353a03-c40f-0410-a6d1-a30d3c3de9de --- ...odule_createRelatedPaymentTransactionList.xml | 16 ++++++++++++---- bt5/erp5_accounting/bt/revision | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml index f390ecd59c..15eb44b902 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml @@ -98,10 +98,12 @@ if len(object_list) > 100:\n context.absolute_url(), N_(\n \'Refusing to process more than 100 objects, check your selection\')))\n \n +tag = \'payment_creation_%s\' % portal.portal_ids.generateNewLongId()\n activated = 0\n for obj in object_list:\n if obj.portal_type in invoice_type_list:\n - obj.getObject().activate().Invoice_createRelatedPaymentTransaction(node=node,\n + obj.getObject().activate(tag=tag).Invoice_createRelatedPaymentTransaction(\n + node=node,\n payment_mode=payment_mode,\n payment=payment,\n batch_mode=1)\n @@ -111,12 +113,17 @@ if not activated:\n return context.REQUEST.RESPONSE.redirect(\n "%s/view?portal_status_message=%s" % (\n context.absolute_url(), N_(\'No Invoice in your selection\')))\n - \n +\n +# activate something on the folder\n +context.activate(after_tag=tag).getTitle()\n +\n return context.REQUEST.RESPONSE.redirect(\n "%s/view?portal_status_message=%s" % (\n context.absolute_url(), N_(\n - \'Payments Creation for ${activated_invoice_count} on ${total_selection_count} Invoices in Progress\',\n - mapping=dict(activated_invoice_count=activated, total_selection_count=len(object_list)))))\n + \'Payments Creation for ${activated_invoice_count} on\'\n + \' ${total_selection_count} Invoices in Progress\',\n + mapping=dict(activated_invoice_count=activated,\n + total_selection_count=len(object_list)))))\n ]]></string> </value> @@ -185,6 +192,7 @@ return context.REQUEST.RESPONSE.redirect(\n <string>object_list</string> <string>dict</string> <string>len</string> + <string>tag</string> <string>activated</string> <string>obj</string> </tuple> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 50f0bcd375..d55f9f7457 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -135 \ No newline at end of file +136 \ No newline at end of file -- 2.30.9