Commit 032b7ae0 authored by Jérome Perrin's avatar Jérome Perrin

InvoiceTransmissionSheet_viewRelatedPaymentTransactionList:

  set the list action link to the accounting module showing all payments 
InvoiceTransmissionSheet_getRelatedPaymentTransactionList:
  use a request cache, because the list action URL will call the list method again



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11563 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e02e711
...@@ -71,13 +71,17 @@ ...@@ -71,13 +71,17 @@
<value> <string>"""Returns a list of payment transactions related to invoice "contained" by\n <value> <string>"""Returns a list of payment transactions related to invoice "contained" by\n
this transmission sheet.\n this transmission sheet.\n
"""\n """\n
\n cached_result = context.REQUEST.other.get(script.getId())\n
if cached_result:\n
return cached_result\n
\n
related_payment_transaction_list = []\n related_payment_transaction_list = []\n
for invoice in context.getAggregateRelatedValueList(\n for invoice in context.getAggregateRelatedValueList(\n
portal_type=context.getPortalInvoiceTypeList()):\n portal_type=context.getPortalInvoiceTypeList()):\n
related_payment_transaction_list.extend(\n related_payment_transaction_list.extend(\n
invoice.getCausalityRelatedValueList(portal_type=\'Payment Transaction\'))\n invoice.getCausalityRelatedValueList(portal_type=\'Payment Transaction\'))\n
\n \n
context.REQUEST.other[script.getId()] = related_payment_transaction_list\n
return related_payment_transaction_list\n return related_payment_transaction_list\n
</string> </value> </string> </value>
</item> </item>
...@@ -122,11 +126,14 @@ return related_payment_transaction_list\n ...@@ -122,11 +126,14 @@ return related_payment_transaction_list\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>related_payment_transaction_list</string>
<string>_getiter_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>script</string>
<string>cached_result</string>
<string>related_payment_transaction_list</string>
<string>_getiter_</string>
<string>invoice</string> <string>invoice</string>
<string>_write_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -248,7 +248,9 @@ ...@@ -248,7 +248,9 @@
</item> </item>
<item> <item>
<key> <string>list_action</string> </key> <key> <string>list_action</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>list_method</string> </key> <key> <string>list_method</string> </key>
...@@ -258,6 +260,10 @@ ...@@ -258,6 +260,10 @@
<key> <string>meta_types</string> </key> <key> <string>meta_types</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -456,7 +462,7 @@ ...@@ -456,7 +462,7 @@
<item> <item>
<key> <string>list_method</string> </key> <key> <string>list_method</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -542,6 +548,29 @@ ...@@ -542,6 +548,29 @@
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python:"accounting_module/view?reset:int=1&" + modules[\'ZTUtils\'].make_query(uid=[x.getUid() for x in here.InvoiceTransmissionSheet_getRelatedPaymentTransactionList()])
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
......
52 53
\ 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