[Erp5-report] r10885 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Oct 23 15:27:23 CEST 2006
Author: jerome
Date: Mon Oct 23 15:27:19 2006
New Revision: 10885
URL: http://svn.erp5.org?rev=10885&view=rev
Log:
Use accounting_create_related_payment_selection, not accounting_selection which is often reseted.
Set a better status message when processing multiple documents.
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_node.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment_mode.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_node.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml Mon Oct 23 15:27:19 2006
@@ -81,25 +81,38 @@
\n
object_list = stool.callSelectionFor(selection_name)\n
\n
+# update selection params, because it\'ll be used in the selection dialog.\n
+stool.setSelectionParamsFor(\'accounting_create_related_payment_selection\',\n
+ params=dict(node_for_related_payment=node,\n
+ payment_mode_for_related_payment=payment_mode,\n
+ payment_for_related_payment=payment))\n
+\n
# XXX prevent to call this on the whole module:\n
if len(object_list) > 100:\n
return context.REQUEST.RESPONSE.redirect(\n
"%s/view?portal_status_message=%s" % (\n
context.absolute_url(), N_(\n
\'Refusing to process more than 100 objects, check your selection\')))\n
- \n
+\n
+activated = 0\n
for obj in object_list:\n
if obj.portal_type in invoice_type_list:\n
- obj = obj.getObject()\n
- if obj.getCausalityRelatedValue(portal_type=\'Payment Transaction\') is None:\n
- obj.activate().Invoice_createRelatedPaymentTransaction(node=node,\n
+ obj.getObject().activate().Invoice_createRelatedPaymentTransaction(node=node,\n
payment_mode=payment_mode,\n
payment=payment,\n
batch_mode=1)\n
-\n
+ activated += 1\n
+\n
+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
return context.REQUEST.RESPONSE.redirect(\n
"%s/view?portal_status_message=%s" % (\n
- context.absolute_url(), N_(\'Payments Creation in Progress\')))\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
]]></string> </value>
@@ -167,10 +180,11 @@
<string>N_</string>
<string>selected_uids</string>
<string>object_list</string>
+ <string>dict</string>
<string>len</string>
+ <string>activated</string>
<string>_getiter_</string>
<string>obj</string>
- <string>None</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_node.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_node.xml?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_node.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_node.xml Mon Oct 23 15:27:19 2006
@@ -283,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_selection\').get(\'node_for_related_payment\')</string> </value>
+ <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_create_related_payment_selection\').get(\'node_for_related_payment\')</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment.xml?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment.xml Mon Oct 23 15:27:19 2006
@@ -283,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_selection\').get(\'payment_for_related_payment\')</string> </value>
+ <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_create_related_payment_selection\').get(\'payment_for_related_payment\')</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment_mode.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment_mode.xml?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment_mode.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewCreateRelatedPaymentTransactionListDialog/your_payment_mode.xml Mon Oct 23 15:27:19 2006
@@ -283,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_selection\').get(\'payment_mode_for_related_payment\')</string> </value>
+ <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_create_related_payment_selection\').get(\'payment_mode_for_related_payment\')</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml Mon Oct 23 15:27:19 2006
@@ -81,7 +81,8 @@
line_portal_type = \'Accounting Transaction Line\'\n
\n
# update selection params, because it\'ll be used in the selection dialog.\n
-portal.portal_selections.setSelectionParamsFor(\'accounting_selection\',\n
+portal.portal_selections.setSelectionParamsFor(\n
+ \'accounting_create_related_payment_selection\',\n
params=dict(node_for_related_payment=node,\n
payment_mode_for_related_payment=payment_mode,\n
payment_for_related_payment=payment))\n
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_node.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_node.xml?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_node.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_node.xml Mon Oct 23 15:27:19 2006
@@ -283,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_selection\').get(\'node_for_related_payment\')</string> </value>
+ <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_create_related_payment_selection\').get(\'node_for_related_payment\')</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment.xml?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment.xml Mon Oct 23 15:27:19 2006
@@ -283,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_selection\').get(\'payment_for_related_payment\')</string> </value>
+ <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_create_related_payment_selection\').get(\'payment_for_related_payment\')</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_viewCreateRelatedPaymentTransactionDialog/your_payment_mode.xml Mon Oct 23 15:27:19 2006
@@ -283,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_selection\').get(\'payment_mode_for_related_payment\')</string> </value>
+ <value> <string>python:here.portal_selections.getSelectionParamsFor(\'accounting_create_related_payment_selection\').get(\'payment_mode_for_related_payment\')</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=10885&r1=10884&r2=10885&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Mon Oct 23 15:27:19 2006
@@ -1,1 +1,1 @@
-95
+96
More information about the Erp5-report
mailing list