Commit 0794f93e authored by Jérome Perrin's avatar Jérome Perrin

include more columns

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43318 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a6aeefee
......@@ -61,6 +61,7 @@ selection_params = portal_selections.getSelectionParamsFor(selection_name)\n
section_category = selection_params.get(\'section_category\')\n
section_category_strict = selection_params.get(\'section_category_strict\')\n
\n
\n
def isSource(accounting_transaction):\n
if section_category:\n
source_section = accounting_transaction.getSourceSectionValue()\n
......@@ -118,7 +119,7 @@ def getAccountReference(node):\n
\n
def getTitle(document):\n
if document is not None:\n
return document.getTitle()\n
return document.getTranslatedTitle()\n
return \'\'\n
\n
bank_account_title_cache = dict()\n
......@@ -155,7 +156,11 @@ def getAccountingCurrencyReference(section_relative_url):\n
\n
\n
portal_type = context.getPortalAccountingMovementTypeList()\n
\n
displayed_delivery_dict = dict()\n
for delivery in delivery_list:\n
if delivery.uid in displayed_delivery_dict: continue\n
displayed_delivery_dict[delivery.uid] = True\n
delivery = delivery.getObject()\n
is_source = isSource(delivery)\n
is_destination = isDestination(delivery)\n
......@@ -193,15 +198,19 @@ for delivery in delivery_list:\n
mirror_payment_title=getBankAccountTitle(movement.getDestinationPaymentValue()),\n
mirror_section_region_title=movement.getDestinationRegionTranslatedTitle(),\n
function_title=getTitle(movement.getSourceFunctionValue()),\n
function_reference=movement.getSourceFunctionReference(),\n
project_title=getTitle(movement.getSourceProjectValue()),\n
funding_title=getTitle(movement.getSourceFundingValue()),\n
funding_reference=movement.getSourceFundingReference(),\n
product_line=movement.getProductLineTranslatedTitle(),\n
date=movement.getStartDate(),\n
debit_price=movement.getSourceInventoriatedTotalAssetDebit(),\n
credit_price=movement.getSourceInventoriatedTotalAssetCredit(),\n
price=(movement.getSourceInventoriatedTotalAssetCredit() - movement.getSourceInventoriatedTotalAssetDebit()),\n
currency=getAccountingCurrencyReference(movement.getSourceSection()),\n
debit=movement.getSourceDebit(),\n
credit=movement.getSourceCredit(),\n
quantity=(movement.getSourceCredit() - movement.getSourceDebit()),\n
resource=movement.getResourceReference(),\n
quantity_precision=movement.getQuantityPrecisionFromResource(movement.getResource()),\n
translated_portal_type=movement.getTranslatedPortalType(),\n
......@@ -239,15 +248,19 @@ for delivery in delivery_list:\n
mirror_section_region_title=movement.getSourceRegionTranslatedTitle(),\n
mirror_payment_title=getBankAccountTitle(movement.getSourcePaymentValue()),\n
function_title=getTitle(movement.getDestinationFunctionValue()),\n
function_reference=movement.getDestinationFunctionReference(),\n
funding_title=getTitle(movement.getDestinationFundingValue()),\n
funding_reference=movement.getDestinationFundingReference(),\n
project_title=getTitle(movement.getDestinationProjectValue()),\n
product_line=movement.getProductLineTranslatedTitle(),\n
date=movement.getStopDate(),\n
debit_price=movement.getDestinationInventoriatedTotalAssetDebit(),\n
credit_price=movement.getDestinationInventoriatedTotalAssetCredit(),\n
price=(movement.getDestinationInventoriatedTotalAssetCredit() - movement.getDestinationInventoriatedTotalAssetDebit()),\n
currency=getAccountingCurrencyReference(movement.getDestinationSection()),\n
debit=movement.getDestinationDebit(),\n
credit=movement.getDestinationCredit(),\n
quantity=(movement.getDestinationCredit() - movement.getDestinationDebit()),\n
resource=movement.getResourceReference(),\n
quantity_precision=movement.getQuantityPrecisionFromResource(movement.getResource()),\n
translated_portal_type=movement.getTranslatedPortalType(),\n
......
......@@ -71,8 +71,11 @@ selection_columns = (\n
(\'mirror_section_title\', \'Third Party\',),\n
(\'mirror_payment_title\', \'Third Party Bank Account\',),\n
(\'mirror_section_region_title\', \'Third Party Region\',),\n
(\'function_reference\',\n
\'%s Reference\' % context.AccountingTransactionLine_getFunctionBaseCategoryTitle()), \n
(\'function_title\',\n
context.AccountingTransactionLine_getFunctionBaseCategoryTitle()),\n
(\'funding_reference\', \'Funding Reference\',),\n
(\'funding_title\', \'Funding\',),\n
(\'project_title\', \'Project\',),\n
(\'product_line\', \'Product Line\'),\n
......@@ -80,9 +83,11 @@ selection_columns = (\n
(\'date\', \'Operation Date\'),\n
(\'debit_price\', \'Converted Debit\'),\n
(\'credit_price\', \'Converted Credit\'),\n
(\'price\', \'Converted Net\'),\n
(\'currency\', \'Accounting Currency\'),\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\'),\n
(\'quantity\', \'Net\'),\n
(\'resource\', \'Transaction Currency\'),\n
(\'translated_portal_type\', \'Line Type\'),\n
(\'parent_translated_portal_type\', \'Transaction Type\'),\n
......
1441
\ No newline at end of file
1442
\ 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