Commit 665d1a08 authored by Jérome Perrin's avatar Jérome Perrin

export account type and financial section

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35004 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent efc64e74
......@@ -136,6 +136,16 @@ for delivery in delivery_list:\n
for movement in delivery.getMovementList(portal_type=portal_type):\n
\n
if is_source:\n
node = movement.getSourceValue(portal_type=\'Account\')\n
node_title = \'\'\n
node_account_type_title = \'\'\n
node_financial_section_title = \'\'\n
if node is not None:\n
node_title = node.getTitle()\n
node_account_type_title = node.getAccountTypeTranslatedTitle()\n
node_financial_section_title = \\\n
node.getFinancialSectionTranslatedTitle()\n
\n
line_list.append(Object(\n
title=movement.hasTitle() and movement.getTitle() or\n
delivery.getTitle(),\n
......@@ -144,8 +154,10 @@ for delivery in delivery_list:\n
parent_description=delivery.getDescription(),\n
parent_reference=delivery.getReference(),\n
specific_reference=delivery.getSourceReference(),\n
node_reference=getAccountReference(movement.getSource(portal_type=\'Account\')),\n
node_title=movement.getSourceTitle(),\n
node_reference=getAccountReference(node),\n
node_title=node_title,\n
node_account_type_title=node_account_type_title,\n
node_financial_section_title=node_financial_section_title,\n
section_title=movement.getSourceSectionTitle(),\n
payment_title=getBankAccountTitle(movement.getSourcePaymentValue()),\n
payment_mode=movement.getPaymentModeTranslatedTitle(),\n
......@@ -167,6 +179,16 @@ for delivery in delivery_list:\n
translated_simulation_state_title=movement.getTranslatedSimulationStateTitle(),))\n
\n
if delivery.portal_type == \'Internal Invoice Transaction\' or not is_source:\n
node = movement.getDestinationValue(portal_type=\'Account\')\n
node_title = \'\'\n
node_account_type_title = \'\'\n
node_financial_section_title = \'\'\n
if node is not None:\n
node_title = node.getTitle()\n
node_account_type_title = node.getAccountTypeTranslatedTitle()\n
node_financial_section_title = \\\n
node.getFinancialSectionTranslatedTitle()\n
\n
line_list.append(Object(\n
title=movement.hasTitle() and movement.getTitle() or\n
delivery.getTitle(),\n
......@@ -175,8 +197,10 @@ for delivery in delivery_list:\n
parent_description=delivery.getDescription(),\n
parent_reference=delivery.getReference(),\n
specific_reference=delivery.getDestinationReference(),\n
node_reference=getAccountReference(movement.getDestination(portal_type=\'Account\')),\n
node_title=movement.getDestinationTitle(),\n
node_reference=getAccountReference(node),\n
node_title=node_title,\n
node_account_type_title=node_account_type_title,\n
node_financial_section_title=node_financial_section_title,\n
section_title=movement.getDestinationSectionTitle(),\n
payment_title=getBankAccountTitle(movement.getDestinationPaymentValue()),\n
payment_mode=movement.getPaymentModeTranslatedTitle(),\n
......@@ -266,6 +290,11 @@ return line_list\n
<string>delivery</string>
<string>is_source</string>
<string>movement</string>
<string>node</string>
<string>node_title</string>
<string>node_account_type_title</string>
<string>node_financial_section_title</string>
<string>None</string>
</tuple>
</value>
</item>
......
......@@ -110,6 +110,14 @@
<string>node_title</string>
<string>Account Name</string>
</tuple>
<tuple>
<string>node_account_type_title</string>
<string>Account Type</string>
</tuple>
<tuple>
<string>node_financial_section_title</string>
<string>Financial Section</string>
</tuple>
<tuple>
<string>section_title</string>
<string>Section</string>
......
1207
\ No newline at end of file
1209
\ 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