diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml index a737488cc9e67c05d0800a9782ecac416848d507..1da4eb80fc06bb26bc13889e4211c32b119855ad 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml @@ -95,6 +95,19 @@ def getTitle(document):\n return document.getTitle()\n return \'\'\n \n +accounting_currency_reference_cache = dict()\n +def getAccountingCurrencyReference(section_relative_url):\n + try:\n + return accounting_currency_reference_cache[section_relative_url]\n + except KeyError:\n + reference = \'\'\n + if section_relative_url:\n + section = portal.restrictedTraverse(section_relative_url, None)\n + if section is not None:\n + reference = section.getProperty(\'price_currency_reference\')\n + accounting_currency_reference_cache[section_relative_url] = reference\n + return reference\n +\n \n portal_type = context.getPortalAccountingMovementTypeList()\n for delivery in delivery_list:\n @@ -119,6 +132,11 @@ for delivery in delivery_list:\n date=movement.getStartDate(),\n debit=movement.getSourceInventoriatedTotalAssetDebit(),\n credit=movement.getSourceInventoriatedTotalAssetCredit(),\n + currency=getAccountingCurrencyReference(movement.getSourceSection()),\n + debit_quantity=movement.getSourceDebit(),\n + credit_quantity=movement.getSourceCredit(),\n + resource=movement.getResourceReference(),\n + quantity_precision=movement.getQuantityPrecisionFromResource(movement.getResource()),\n translated_portal_type=movement.getTranslatedPortalType(),\n parent_translated_portal_type=delivery.getTranslatedPortalType(),\n translated_simulation_state_title=movement.getTranslatedSimulationStateTitle(),))\n @@ -138,6 +156,11 @@ for delivery in delivery_list:\n date=movement.getStopDate(),\n debit=movement.getDestinationInventoriatedTotalAssetDebit(),\n credit=movement.getDestinationInventoriatedTotalAssetCredit(),\n + currency=getAccountingCurrencyReference(movement.getDestinationSection()),\n + debit_quantity=movement.getDestinationDebit(),\n + credit_quantity=movement.getDestinationCredit(),\n + resource=movement.getResourceReference(),\n + quantity_precision=movement.getQuantityPrecisionFromResource(movement.getResource()),\n translated_portal_type=movement.getTranslatedPortalType(),\n parent_translated_portal_type=delivery.getTranslatedPortalType(),\n translated_simulation_state_title=movement.getTranslatedSimulationStateTitle(),))\n @@ -203,6 +226,8 @@ return line_list\n <string>account_reference_cache</string> <string>getAccountReference</string> <string>getTitle</string> + <string>accounting_currency_reference_cache</string> + <string>getAccountingCurrencyReference</string> <string>portal_type</string> <string>delivery</string> <string>is_source</string> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection.xml index f58f77803244922c08e0bc8166694524772cc440..d87c583c1b7db578aa96ed1c0071aa5cd9140783 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection.xml @@ -95,6 +95,8 @@ <string>listbox_debit</string> <string>listbox_date</string> <string>listbox_credit</string> + <string>listbox_credit_quantity</string> + <string>listbox_debit_quantity</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml index 6deefd8fb17fe4f4b5890d624d469c3a0c17591c..c0dd962e999dcc34abbb302c62a7706c780db449 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml @@ -134,6 +134,22 @@ <string>credit</string> <string>Credit</string> </tuple> + <tuple> + <string>currency</string> + <string>Accounting Currency</string> + </tuple> + <tuple> + <string>debit_quantity</string> + <string>Original Debit</string> + </tuple> + <tuple> + <string>credit_quantity</string> + <string>Original Credit</string> + </tuple> + <tuple> + <string>resource</string> + <string>Original Currency</string> + </tuple> <tuple> <string>translated_portal_type</string> <string>Line Type</string> @@ -165,6 +181,14 @@ <string>credit</string> <string>Credit</string> </tuple> + <tuple> + <string>debit_quantity</string> + <string>Original Debit</string> + </tuple> + <tuple> + <string>credit_quantity</string> + <string>Original Credit</string> + </tuple> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox_credit_quantity.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox_credit_quantity.xml new file mode 100644 index 0000000000000000000000000000000000000000..de42ca4e675376390fb546268da8498033d0c4f3 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox_credit_quantity.xml @@ -0,0 +1,121 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>precision</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>listbox_credit_quantity</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>precision</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_money_quantity</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>precision</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>cell/quantity_precision | python:2</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox_debit_quantity.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox_debit_quantity.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebe5aacfa7706f8dc245b101307cb4799370f804 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox_debit_quantity.xml @@ -0,0 +1,121 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>precision</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>listbox_debit_quantity</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>precision</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_money_quantity</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>precision</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>cell/quantity_precision | python:2</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index a65c2ed38d5a3f91a81ee1bd70f4982d7d76c05a..1720e6f2b51113423c4f984f22f83e40da496202 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -1171 \ No newline at end of file +1173 \ No newline at end of file