diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerColumnItemList.py b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerColumnItemList.py index 2fc358107c2ae8d39b595fe42ccf99e41c997770..0828d43809ec7097d0ceea9230e46748381e6a9c 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerColumnItemList.py +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerColumnItemList.py @@ -1,6 +1,7 @@ return ( ('Movement_getNodeGapId', 'Account Code'), ('node_translated_title', 'Account Name'), + ('Movement_getNodeFinancialSectionTitle', 'Financial Section'), ('section_title', 'Section'), ('mirror_section_title', 'Third Party'), ('date', 'Operation Date'), diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.py b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.py new file mode 100644 index 0000000000000000000000000000000000000000..677b2993fb9b301cff988317b916941930fd6735 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.py @@ -0,0 +1,11 @@ +cache_id = '{}.cache'.format(script.getId()) + +financial_section_cache = context.REQUEST.other.get(cache_id, {}) +key = brain.node_relative_url +financial_section_title = financial_section_cache.get(key) +if financial_section_title is None: + financial_section_title = context.getPortalObject().restrictedTraverse( + key).getFinancialSectionTranslatedTitle() + financial_section_cache[key] = financial_section_title + context.REQUEST.other[cache_id] = financial_section_cache +return financial_section_title diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.xml new file mode 100644 index 0000000000000000000000000000000000000000..36bf00d92efd5b6f4095f839c4a29195542c4df6 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>brain, selection=None, **kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Movement_getNodeFinancialSectionTitle</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py index 3c1bc66b0eaad7c02145248a06c15e0a8959ca59..fe3c983741753b7b9686fe6ec1635a3047725e92 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py @@ -190,7 +190,8 @@ if from_date or is_pl_account: if params.get('node_uid'): previous_balance.edit( Movement_getNodeGapId=node.Account_getGapId(), - node_translated_title=node.getTranslatedTitle() + node_translated_title=node.getTranslatedTitle(), + Movement_getNodeFinancialSectionTitle=node.getFinancialSectionTranslatedTitle(), ) if params.get('mirror_section_uid'): brain_list = portal.portal_catalog(uid=params['mirror_section_uid'], limit=2) diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/bank.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/bank.xml index bc9166d2001e1a0d8b72f3aeda1087ff53860977..fb0e087be7a24b8462cf9aa8d45afbd22986d710 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/bank.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/bank.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/asset/cash/bank</string> <string>gap/my_country/my_accounting_standards/5</string> + <string>financial_section/asset/cash</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/collected_vat.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/collected_vat.xml index ae296a55e72a062f8fbd28451ba197010fcd4730..38469cd28fb2c25d2e24272f98ced846264ae934 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/collected_vat.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/collected_vat.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/liability/payable/collected_vat</string> <string>gap/my_country/my_accounting_standards/4/44/445/4457</string> + <string>financial_section/liability/payable</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/equity.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/equity.xml index af7cd966146b7baa2d8118efa8bbc7bf6f29b8f2..9f4435c1e8f98703afb13fcb9d8b1995fbb409fd 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/equity.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/equity.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/equity</string> <string>gap/my_country/my_accounting_standards/1</string> + <string>financial_section/equity/common_stock</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/fixed_assets.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/fixed_assets.xml index 0dde74e2a070bf79361a863673f15afe3f97f6bc..84f2894cf770b4d364fda9db20f366a6d605d6fa 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/fixed_assets.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/fixed_assets.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/asset</string> <string>gap/my_country/my_accounting_standards/2</string> + <string>financial_section/asset/fixed_assets</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/goods_purchase.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/goods_purchase.xml index b284ab32ef76a118b57f1749bbde1a8e7a4972c7..cc628ddd62912006be54f9d830456dd6c18ab8b9 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/goods_purchase.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/goods_purchase.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/expense</string> <string>gap/my_country/my_accounting_standards/6</string> + <string>financial_section/expense/cogs</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/goods_sales.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/goods_sales.xml index 1d57439e63c447fa3f0938b78518c5105b7ccc1f..26d16dfe30bc80e3a8ee0738fe8cf4fa70306003 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/goods_sales.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/goods_sales.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/income</string> <string>gap/my_country/my_accounting_standards/7</string> + <string>financial_section/income/sales</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/payable.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/payable.xml index 46d99f0418c2de4690b979add5d4a34cb7ea27c9..bd557d0bb87d64b4a080340c570790f15c6b6bf3 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/payable.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/payable.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/liability/payable</string> <string>gap/my_country/my_accounting_standards/4/40</string> + <string>financial_section/liability/payable</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/receivable.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/receivable.xml index a2e6eb29a5005471c68fea43dbf9204350836812..ab684c4266df79d8d6872997f5870fcbd23914fa 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/receivable.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/receivable.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/asset/receivable</string> <string>gap/my_country/my_accounting_standards/4/41</string> + <string>financial_section/asset/receivables</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/refundable_vat.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/refundable_vat.xml index e0cf51830f9c3b8f77a355b11cc0a5abf0d6b216..6cf1c47aea50b757b42ac661604eacdab72bdb3f 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/refundable_vat.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/refundable_vat.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/asset/receivable/refundable_vat</string> <string>gap/my_country/my_accounting_standards/4/44/445/4456</string> + <string>financial_section/asset/receivables</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/stocks.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/stocks.xml index 5230648c994063e8dee5b98d471d343f1652f288..7584cd8ec98f3a9a7f43ee5a2d77be95ff377725 100644 --- a/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/stocks.xml +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/account_module/stocks.xml @@ -78,6 +78,7 @@ <tuple> <string>account_type/asset</string> <string>gap/my_country/my_accounting_standards/3</string> + <string>financial_section/asset/inventory</string> </tuple> </value> </item> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/cash.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/cash.xml new file mode 100644 index 0000000000000000000000000000000000000000..74713e52b9faab3522ea33c78b5db888c0958721 --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/cash.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>cash</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Cash</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/fixed_assets.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/fixed_assets.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5d7ca4c614b4d5914058c58691db3a3b623f962 --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/fixed_assets.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>fixed_assets</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Fixed Assets</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/inventory.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/inventory.xml new file mode 100644 index 0000000000000000000000000000000000000000..51fe58ac3e38ffa1472290c77bce2970251d5ffe --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/inventory.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>inventory</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Inventory</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/receivables.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/receivables.xml new file mode 100644 index 0000000000000000000000000000000000000000..e72e81872ac89dea63ff2430b187148189dee1a3 --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/asset/receivables.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>receivables</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Accounts Receivable</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/equity/common_stock.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/equity/common_stock.xml new file mode 100644 index 0000000000000000000000000000000000000000..01e670690fe791b789b3da6e7aa09261d864552a --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/equity/common_stock.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>common_stock</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Common Stock</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/expense/cogs.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/expense/cogs.xml new file mode 100644 index 0000000000000000000000000000000000000000..a0d8815b857a443fe7665201262902a4b9b9b93f --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/expense/cogs.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>cogs</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Cost of Sales</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/income/sales.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/income/sales.xml new file mode 100644 index 0000000000000000000000000000000000000000..fa9e36a58328ff64803d16154b0c67311f5c1228 --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/income/sales.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>sales</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Sales Revenues</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/liability/payable.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/liability/payable.xml new file mode 100644 index 0000000000000000000000000000000000000000..5a8e357e1f108925cf764c8419bf710586ea28b4 --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_categories/financial_section/liability/payable.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>payable</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Accounts Payable</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/bt/template_path_list b/bt5/erp5_accounting_ui_test/bt/template_path_list index e22449a732411899913be9d5a6867f9063e0a9a6..97704f34d9b80b5b8881c33b0f3f2510b46a4dcf 100644 --- a/bt5/erp5_accounting_ui_test/bt/template_path_list +++ b/bt5/erp5_accounting_ui_test/bt/template_path_list @@ -23,6 +23,14 @@ organisation_module/supplier organisation_module/supplier/** person_module/john_smith person_module/john_smith/** +portal_categories/financial_section/asset/cash +portal_categories/financial_section/asset/fixed_assets +portal_categories/financial_section/asset/inventory +portal_categories/financial_section/asset/receivables +portal_categories/financial_section/equity/common_stock +portal_categories/financial_section/expense/cogs +portal_categories/financial_section/income/sales +portal_categories/financial_section/liability/payable portal_categories/gap/another_country portal_categories/gap/another_country/** portal_categories/gap/my_country diff --git a/product/ERP5/tests/testAccountingReports.py b/product/ERP5/tests/testAccountingReports.py index c6601bd405e928bb48ac18dd42da93d9213603e5..b1b7795b794cd58e8b3c648e8b15f4cc5febc1c8 100644 --- a/product/ERP5/tests/testAccountingReports.py +++ b/product/ERP5/tests/testAccountingReports.py @@ -5399,8 +5399,8 @@ DT, b, P2 - Project 2''', self.assertEqual(3, len(data_line_list)) self.assertEqual( - ['Movement_getNodeGapId', 'node_translated_title', 'section_title', - 'mirror_section_title', 'date', 'modification_date', + ['Movement_getNodeGapId', 'node_translated_title', 'Movement_getNodeFinancialSectionTitle', + 'section_title', 'mirror_section_title', 'date', 'modification_date', 'Movement_getSpecificReference', 'Movement_getExplanationTranslatedPortalType', 'Movement_getExplanationTitle', 'Movement_getExplanationReference', @@ -5417,6 +5417,7 @@ DT, b, P2 - Project 2''', self.checkLineProperties(data_line_list[0], Movement_getNodeGapId='7', node_translated_title='Goods Sales', + Movement_getNodeFinancialSectionTitle='Sales Revenues', section_title='My Organisation', mirror_section_title='Client 1', date=DateTime(2006, 2, 2), @@ -5442,6 +5443,7 @@ DT, b, P2 - Project 2''', self.checkLineProperties(data_line_list[1], Movement_getNodeGapId='7', node_translated_title='Goods Sales', + Movement_getNodeFinancialSectionTitle='Sales Revenues', section_title='My Organisation', mirror_section_title='Client 1', date=DateTime(2006, 2, 2), @@ -5467,6 +5469,7 @@ DT, b, P2 - Project 2''', self.checkLineProperties(data_line_list[2], Movement_getNodeGapId='7', node_translated_title='Goods Sales', + Movement_getNodeFinancialSectionTitle='Sales Revenues', section_title='My Organisation', mirror_section_title='Client 1', date=DateTime(2006, 2, 2), @@ -5630,8 +5633,8 @@ DT, b, P2 - Project 2''', # all the columns configured in AccountModule_getGeneralLedgerColumnItemList # are displayed self.assertEqual( - ['Movement_getNodeGapId', 'node_translated_title', 'section_title', - 'mirror_section_title', 'date', 'modification_date', + ['Movement_getNodeGapId', 'node_translated_title', 'Movement_getNodeFinancialSectionTitle', + 'section_title', 'mirror_section_title', 'date', 'modification_date', 'Movement_getSpecificReference', 'Movement_getExplanationTranslatedPortalType', 'Movement_getExplanationTitle', 'Movement_getExplanationReference', @@ -5651,6 +5654,7 @@ DT, b, P2 - Project 2''', self.checkLineProperties(data_line_list[0], Movement_getNodeGapId='41', node_translated_title='Receivable', + Movement_getNodeFinancialSectionTitle='Accounts Receivable', section_title='My Organisation', mirror_section_title='Client 1', date=DateTime(2006, 2, 2), @@ -5681,6 +5685,7 @@ DT, b, P2 - Project 2''', self.checkLineProperties(data_line_list[0], Movement_getNodeGapId='7', node_translated_title='Goods Sales', + Movement_getNodeFinancialSectionTitle='Sales Revenues', section_title='My Organisation', mirror_section_title='Client 1', date=DateTime(2006, 2, 2), @@ -5707,6 +5712,7 @@ DT, b, P2 - Project 2''', self.checkLineProperties(data_line_list[1], Movement_getNodeGapId='7', node_translated_title='Goods Sales', + Movement_getNodeFinancialSectionTitle='Sales Revenues', section_title='My Organisation', mirror_section_title='Client 1', date=DateTime(2006, 2, 2), @@ -5733,6 +5739,7 @@ DT, b, P2 - Project 2''', self.checkLineProperties(data_line_list[2], Movement_getNodeGapId='7', node_translated_title='Goods Sales', + Movement_getNodeFinancialSectionTitle='Sales Revenues', section_title='My Organisation', mirror_section_title='Client 1', date=DateTime(2006, 2, 2),