Commit 01ea5d13 authored by Jérome Perrin's avatar Jérome Perrin

transaction.getSourcePaymentValue(portal_type='External Payment') will use

acquisition, so we simply call getSourcePaymentValue() and check the portal
type of this value.
Also, if no title is set for an external payment, use the third party title.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13284 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 609315a2
...@@ -86,14 +86,18 @@ else:\n ...@@ -86,14 +86,18 @@ else:\n
\n \n
source_section = transaction.getSourceSectionValue()\n source_section = transaction.getSourceSectionValue()\n
if source_section is not None and source_section.isMemberOf(section_category):\n if source_section is not None and source_section.isMemberOf(section_category):\n
external_payment = transaction.getDestinationPaymentValue(portal_type=\'External Payment\')\n external_payment = transaction.getDestinationPaymentValue()\n
if external_payment is not None:\n if external_payment is not None and \\\n
return external_payment.getShortTitle() or external_payment.getTitle()\n external_payment.getPortalType() == \'External Payment\':\n
return external_payment.getShortTitle() or external_payment.getTitle()\\\n
or transaction.getDestinationSectionTitle()\n
return transaction.getDestinationSectionTitle()\n return transaction.getDestinationSectionTitle()\n
\n \n
external_payment = transaction.getSourcePaymentValue(portal_type=\'External Payment\')\n external_payment = transaction.getSourcePaymentValue()\n
if external_payment is not None:\n if external_payment is not None and \\\n
return external_payment.getShortTitle() or external_payment.getTitle()\n external_payment.getPortalType() == \'External Payment\':\n
return external_payment.getShortTitle() or external_payment.getTitle()\\\n
or transaction.getSourceSectionTitle()\n
return transaction.getSourceSectionTitle()\n return transaction.getSourceSectionTitle()\n
</string> </value> </string> </value>
</item> </item>
......
84 85
\ 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