Commit f1001b9b authored by Yusei Tahara's avatar Yusei Tahara

Reuse python script for same routine.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19059 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 33362f05
......@@ -68,21 +68,12 @@
<value> <string>"""Return the \'side-specific\' reference, ie. the source reference or\n
destination reference.\n
"""\n
if selection_name is None:\n
# TODO: this should definitivly be REQUEST chached\n
selection_name = \'accounting_selection\'\n
\n
section_category=context.portal_selections.getSelectionParamsFor(selection_name).get(\'section_category\')\n
if not section_category:\n
return\n
\n
if brain is not None:\n
transaction = brain.getObject()\n
else:\n
transaction = context\n
\n
source_section = transaction.getSourceSectionValue()\n
if source_section is not None and source_section.isMemberOf(section_category):\n
if transaction.AccountingTransaction_isSourceView():\n
return transaction.getSourceReference()\n
return transaction.getDestinationReference()\n
</string> </value>
......@@ -139,10 +130,8 @@ return transaction.getDestinationReference()\n
<string>kwd</string>
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>section_category</string>
<string>transaction</string>
<string>source_section</string>
<string>context</string>
</tuple>
</value>
</item>
......
572
\ No newline at end of file
573
\ 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