Commit f170f4e3 authored by Jérome Perrin's avatar Jérome Perrin

Use selected uids to create a list of related payment transaction



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11309 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 680fa4bc
...@@ -73,13 +73,17 @@ ...@@ -73,13 +73,17 @@
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
stool = portal.portal_selections\n stool = portal.portal_selections\n
getObject = portal.portal_catalog.getObject\n
invoice_type_list = portal.getPortalInvoiceTypeList()\n invoice_type_list = portal.getPortalInvoiceTypeList()\n
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
\n \n
selected_uids = stool.updateSelectionCheckedUidList(\n stool.updateSelectionCheckedUidList(selection_name, listbox_uid, uids)\n
selection_name, listbox_uid, uids)\n selection_uid_list = context.portal_selections.getSelectionCheckedUidsFor(\n
\n selection_name)\n
object_list = stool.callSelectionFor(selection_name)\n if selection_uid_list:\n
object_list = [getObject(uid) for uid in selection_uid_list]\n
else:\n
object_list = stool.callSelectionFor(selection_name)\n
\n \n
# update selection params, because it\'ll be used in the selection dialog.\n # update selection params, because it\'ll be used in the selection dialog.\n
stool.setSelectionParamsFor(\'accounting_create_related_payment_selection\',\n stool.setSelectionParamsFor(\'accounting_create_related_payment_selection\',\n
...@@ -176,14 +180,18 @@ return context.REQUEST.RESPONSE.redirect(\n ...@@ -176,14 +180,18 @@ return context.REQUEST.RESPONSE.redirect(\n
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>stool</string> <string>stool</string>
<string>getObject</string>
<string>invoice_type_list</string> <string>invoice_type_list</string>
<string>N_</string> <string>N_</string>
<string>selected_uids</string> <string>selection_uid_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>uid</string>
<string>object_list</string> <string>object_list</string>
<string>dict</string> <string>dict</string>
<string>len</string> <string>len</string>
<string>activated</string> <string>activated</string>
<string>_getiter_</string>
<string>obj</string> <string>obj</string>
</tuple> </tuple>
</value> </value>
......
125 126
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment