diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml index 8a12b1755c6d46e9dcea7b0b879cca5ecc6833b8..df2d3b0a677b1410fe82ac95473f640039f8227e 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml @@ -63,6 +63,7 @@ portal = context.getPortalObject()\n getInventoryList = portal.portal_simulation.getInventoryList\n getInventory = portal.portal_simulation.getInventoryAssetPrice\n Base_translateString = portal.Base_translateString\n +selected_gap = gap_root\n \n inventory_movement_type_list = portal.getPortalInventoryMovementTypeList()\n # Balance Movement Type list is all movements that are both inventory movement\n @@ -281,8 +282,9 @@ def getNodeTitleAndId(node_relative_url):\n return node_title_and_id_cache.setdefault(node_relative_url,\n ( node.getUid(),\n node.getTitle(),\n - node.Account_getGapId(),\n - node.getProperty(\'string_index\') ))\n + node.Account_getGapId(gap_root=selected_gap),\n + node.getProperty(\'string_index\'),\n + node))\n \n # include all accounts, even those not selected before (no movements in the\n # period)\n @@ -574,7 +576,7 @@ if account_type_to_group_by_payment:\n line_list = []\n for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n line_per_account.items():\n - node_uid, node_title, node_id, string_index = getNodeTitleAndId(node_relative_url)\n + node_uid, node_title, node_id, string_index, node = getNodeTitleAndId(node_relative_url)\n if mirror_section_uid is not MARKER:\n if mirror_section_uid is None:\n node_title = \'%s (%s)\' % ( node_title, Base_translateString(\'None\'))\n @@ -591,6 +593,9 @@ for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n if not string_index:\n string_index = \'%-10s\' % node_id\n string_index = \'%s %s\' % (string_index, node_title)\n +\n + if selected_gap and not node.isMemberOf(selected_gap):\n + continue\n \n initial_debit_balance = data.get(\'initial_debit_balance\', 0)\n initial_credit_balance = data.get(\'initial_credit_balance\', 0)\n @@ -645,7 +650,8 @@ request.set(\'TrialBalance.final_balance_if_credit\', total_final_balance_if_cre if not per_account_class_summary:\n return line_list\n \n -current_gap = portal.portal_preferences.getPreferredAccountingTransactionGap()\n +current_gap = selected_gap or \\\n + portal.portal_preferences.getPreferredAccountingTransactionGap()\n if current_gap.startswith(\'gap/\'):\n current_gap = current_gap[4:]\n def getAccountClass(account_relative_url):\n @@ -717,7 +723,7 @@ return new_line_list\n </item> <item> <key> <string>_params</string> </key> - <value> <string>show_empty_accounts, expand_accounts, at_date, from_date, period_start_date, section_uid, simulation_state, precision, node_uid, per_account_class_summary=0, **kw</string> </value> + <value> <string>show_empty_accounts, expand_accounts, at_date, from_date, period_start_date, section_uid, simulation_state, precision, node_uid, gap_root=None, per_account_class_summary=0, **kw</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -737,7 +743,7 @@ return new_line_list\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>10</int> </value> + <value> <int>11</int> </value> </item> <item> <key> <string>co_varnames</string> </key> @@ -752,6 +758,7 @@ return new_line_list\n <string>simulation_state</string> <string>precision</string> <string>node_uid</string> + <string>gap_root</string> <string>per_account_class_summary</string> <string>kw</string> <string>Products.PythonScripts.standard</string> @@ -766,6 +773,7 @@ return new_line_list\n <string>getInventoryList</string> <string>getInventory</string> <string>Base_translateString</string> + <string>selected_gap</string> <string>inventory_movement_type_list</string> <string>append</string> <string>$append0</string> @@ -847,6 +855,7 @@ return new_line_list\n <key> <string>func_defaults</string> </key> <value> <tuple> + <none/> <int>0</int> </tuple> </value> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml index 2d60beea1218a982da043d659ac3245628389daa..f6a1137b38fa3c98be6e7c313597068f25f0d281 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml @@ -76,6 +76,7 @@ display_categories = request.get(\'display_categories\', False)\n period_start_date = context\\\n .Base_getAccountingPeriodStartDateForSectionCategory(\n section_category=section_category, date=from_date or at_date)\n +gap_root = request.get(\'gap_root\')\n \n # currency precision\n currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n @@ -122,13 +123,14 @@ else:\n (\'credit\', \'Credit\'),\n (\'running_total_price\', \'Net\'), )\n \n +# XXX getting all gap is wrong approach, it represents more than 1000\n +# objects\n if gap:\n gap_value_list = cat_tool.gap.restrictedTraverse(gap)\\\n .getCategoryChildValueList(is_self_excluded=0)\n else:\n - cat = \'gap/%s\' % (\n - context.portal_preferences.getPreferredAccountingTransactionGap()\n - or context.getPortalDefaultGapRoot())\n + cat = gap_root or (\'gap/%s\' % (\n + context.portal_preferences.getPreferredAccountingTransactionGap()))\n \n gap_value_list = cat_tool.resolveCategory(cat).getCategoryChildValueList()\n \n @@ -311,6 +313,7 @@ return result\n <string>False</string> <string>display_categories</string> <string>period_start_date</string> + <string>gap_root</string> <string>currency</string> <string>precision</string> <string>_write_</string> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml index 69b49292217435508164b33a57d2871fb747c05e..ea474cdaf08c8d2118131e2fdfabc9b261c1dd29 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml @@ -67,6 +67,7 @@ simulation_state = request[\'simulation_state\']\n role_filter_list = request.get(\'entity_role\', None)\n omit_balanced_accounts = request[\'omit_balanced_accounts\']\n from_date = request.get(\'from_date\', None)\n +gap_root = request.get(\'gap_root\', None)\n \n request.other[\'is_accounting_report\'] = True\n \n @@ -116,13 +117,15 @@ if omit_balanced_accounts :\n ).getAccountTypeRelatedValueList(\n strict_membership=1,\n portal_type=\'Account\'):\n - valid_node_uids.append(account.getUid())\n + if not gap_root or account.isMemberOf(gap_root):\n + valid_node_uids.append(account.getUid())\n for account in portal.portal_categories.resolveCategory(\n \'account_type/liability/payable\'\n ).getAccountTypeRelatedValueList(\n strict_membership=1,\n portal_type=\'Account\'):\n - valid_node_uids.append(account.getUid())\n + if not gap_root or account.isMemberOf(gap_root):\n + valid_node_uids.append(account.getUid())\n \n if not params[\'hide_grouping\'] :\n entity_columns.append((\'grouping_reference\',\n @@ -144,7 +147,7 @@ for party in context.Account_zDistinctSectionList():\n else:\n title = o.getTitle()\n if o.getProperty(\'role\', None):\n - title += \' (%s)\' % o.getRoleTitle()\n + title += \' (%s)\' % o.getRoleTranslatedTitle()\n result.append(\n ReportSection(title=title,\n level=1,\n @@ -216,6 +219,7 @@ return result\n <string>role_filter_list</string> <string>omit_balanced_accounts</string> <string>from_date</string> + <string>gap_root</string> <string>True</string> <string>_write_</string> <string>result</string> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTrialBalanceReportSectionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTrialBalanceReportSectionList.xml index 76fee3aceb672158f2fda17ceed018b7393987b6..73e343e643a2295398dbad52ce806d504cf41ad0 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTrialBalanceReportSectionList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTrialBalanceReportSectionList.xml @@ -67,7 +67,7 @@ simulation_state = request[\'simulation_state\']\n expand_accounts = request.get(\'expand_accounts\', False)\n show_empty_accounts = request[\'show_empty_accounts\']\n per_account_class_summary = request[\'per_account_class_summary\']\n -\n +gap_root = request.get(\'gap_root\', None)\n section_uid = portal.Base_getSectionUidListForSectionCategory(\n request[\'section_category\'])\n \n @@ -116,7 +116,8 @@ return [ ReportSection(\n precision=precision,\n node_uid=node_uid,\n per_account_class_summary=\n - per_account_class_summary), )]\n + per_account_class_summary,\n + gap_root=gap_root,), )]\n </string> </value> </item> <item> @@ -169,6 +170,7 @@ return [ ReportSection(\n <string>expand_accounts</string> <string>show_empty_accounts</string> <string>per_account_class_summary</string> + <string>gap_root</string> <string>section_uid</string> <string>period_start_date</string> <string>currency</string> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewDialogFieldLibrary.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewDialogFieldLibrary.xml index 1a30f5951f7383e208398ae4b4ffc1db9a8b9daa..f919c25524ed1f8ce1131f5a580d062a41820265 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewDialogFieldLibrary.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewDialogFieldLibrary.xml @@ -92,6 +92,7 @@ <string>your_at_date</string> <string>your_from_date</string> <string>your_gap</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewDialogFieldLibrary/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewDialogFieldLibrary/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5a36d38022251bf698e82ae332fcddc609f6b24 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewDialogFieldLibrary/your_gap_root.xml @@ -0,0 +1,286 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ListField" module="Products.Formulator.StandardFields"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_gap_root</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> + <item> + <key> <string>required_not_found</string> </key> + <value> <string>Input is required but no input given.</string> </value> + </item> + <item> + <key> <string>unknown_selection</string> </key> + <value> <string>You selected an item that was not in the list.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>In a report, will only show accounts using the accounting plan.</string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>GAP Root</string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <int>0</int> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.TALESField</string> + <string>TALESMethod</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python:here.AccountModule_getAvailableGapList(include_gap_in_path=1, include_empty_item=1)</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport.xml index 17e60ca15ab8005c6713b0e6a74bee39fee37b28..893bc4ee74e6ab48db8fafe46031d71772c10b1d 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport.xml @@ -71,6 +71,7 @@ <string>your_from_date</string> <string>your_at_date</string> <string>your_gap</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..46fa6d53a74c33bec006761e94750bc72c931355 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport/your_gap_root.xml @@ -0,0 +1,93 @@ +<?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/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>your_gap_root</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>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>your_gap_root</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>AccountModule_viewReportFieldLibrary</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> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml index 37bba0ecc19cd943e6255edd361a47e5f38c9a37..6a8e93d26492053198328b40b4c2cb64665a4677 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml @@ -68,6 +68,7 @@ <value> <list> <string>your_gap</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..611e7e97e5587d602ee297d7b792ac40a32a535d --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_gap_root.xml @@ -0,0 +1,87 @@ +<?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>id</string> </key> + <value> <string>your_gap_root</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>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>your_gap_root</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>AccountModule_viewDialogFieldLibrary</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> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml index f338c77fef23069cbd9f012ba52b062f10acb8c3..235e06c3b7213cb68d8d776507004bcf8e1ddd39 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml @@ -71,6 +71,7 @@ <string>your_omit_empty_accounts</string> <string>your_omit_grouped_references</string> <string>your_entity_role</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..46fa6d53a74c33bec006761e94750bc72c931355 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport/your_gap_root.xml @@ -0,0 +1,93 @@ +<?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/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>your_gap_root</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>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>your_gap_root</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>AccountModule_viewReportFieldLibrary</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> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReportDialog.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReportDialog.xml index 748cd71c72a21fff59c54c742b4caba098368da0..31de37840e02edd83ecbcc17497a4244f5da8ccd 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReportDialog.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReportDialog.xml @@ -65,7 +65,9 @@ <item> <key> <string>center</string> </key> <value> - <list/> + <list> + <string>your_gap_root</string> + </list> </value> </item> <item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReportDialog/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReportDialog/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..611e7e97e5587d602ee297d7b792ac40a32a535d --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReportDialog/your_gap_root.xml @@ -0,0 +1,87 @@ +<?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>id</string> </key> + <value> <string>your_gap_root</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>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>your_gap_root</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>AccountModule_viewDialogFieldLibrary</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> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewReportFieldLibrary.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewReportFieldLibrary.xml index f7b6bde76d71ca5d75f22fb22704be234385d7fc..16647b8ed89cf5c49912d2cbad82a1eb6c455b13 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewReportFieldLibrary.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewReportFieldLibrary.xml @@ -90,6 +90,7 @@ <string>your_portal_type</string> <string>your_node</string> <string>your_gap</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewReportFieldLibrary/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewReportFieldLibrary/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..89fb4702979b71bbdcd271c8a454421b51d17265 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewReportFieldLibrary/your_gap_root.xml @@ -0,0 +1,319 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ListField" module="Products.Formulator.StandardFields"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_gap_root</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> + <item> + <key> <string>required_not_found</string> </key> + <value> <string>Input is required but no input given.</string> </value> + </item> + <item> + <key> <string>unknown_selection</string> </key> + <value> <string>You selected an item that was not in the list.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>In a report, will only show accounts using the accounting plan.</string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>first_item</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>GAP Root</string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <int>0</int> </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>request/gap_root | nothing</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>request/gap_root | nothing</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python:here.AccountModule_getAvailableGapList(include_gap_in_path=1, include_empty_item=1)</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReport.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReport.xml index 5bbb1f314c655bfd0386fd8952f069d76cdd6029..8642e16ef431026486d7a9d5049206b0c7350e92 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReport.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReport.xml @@ -69,6 +69,7 @@ <string>your_at_date</string> <string>your_section_category</string> <string>your_simulation_state</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReport/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReport/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..46fa6d53a74c33bec006761e94750bc72c931355 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReport/your_gap_root.xml @@ -0,0 +1,93 @@ +<?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/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>your_gap_root</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>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>your_gap_root</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>AccountModule_viewReportFieldLibrary</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> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog.xml index 9d4d029198d2167e04d3df4b107d035ebba41bbc..9831e27cc8297ca7e4736a7ad08173d1bdc7db47 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog.xml @@ -67,6 +67,7 @@ <value> <list> <string>your_gap</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..611e7e97e5587d602ee297d7b792ac40a32a535d --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog/your_gap_root.xml @@ -0,0 +1,87 @@ +<?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>id</string> </key> + <value> <string>your_gap_root</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>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>your_gap_root</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>AccountModule_viewDialogFieldLibrary</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> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml index 838f04a07d8f4f9dca16e6478b13a9cb8c6c7248..ffa55a2f79b5150785bf8089e7035a2c6759ec4a 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml @@ -68,10 +68,10 @@ if number_method == \'account_reference\':\n \n ## elif number_method == \'gap_id\':\n # GAP id is the default rendering\n -current_gap = preference_tool.getPreferredAccountingTransactionGap() or \'\'\n +current_gap = gap_root or preference_tool.getPreferredAccountingTransactionGap() or \'\'\n for gap in context.getGapValueList(): \n if current_gap in gap.getPath(): \n - return gap.getReference() or gap.getId()\n + return gap.getReference() or gap.getId()\n return \'\'\n </string> </value> </item> @@ -83,7 +83,7 @@ return \'\'\n </item> <item> <key> <string>_params</string> </key> - <value> <string></string> </value> + <value> <string>gap_root=None</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -103,12 +103,13 @@ return \'\'\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>0</int> </value> + <value> <int>1</int> </value> </item> <item> <key> <string>co_varnames</string> </key> <value> <tuple> + <string>gap_root</string> <string>_getattr_</string> <string>context</string> <string>preference_tool</string> @@ -128,7 +129,9 @@ return \'\'\n <item> <key> <string>func_defaults</string> </key> <value> - <none/> + <tuple> + <none/> + </tuple> </value> </item> <item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml index e0a351cf77455e6d7a339db0b9d2375d442ec1bf..73a08ec3ff6cdcc58c8e91c9cea74ea6b745f561 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml @@ -67,6 +67,7 @@ section_uid = context.Base_getSectionUidListForSectionCategory(\n request[\'section_category\'])\n payment_mode = request.get(\'payment_mode\')\n payment = request.get(\'payment\')\n +gap_root = request.get(\'gap_root\')\n \n # Also get the currency, to know the precision\n currency = context.Base_getCurrencyForSection(request[\'section_category\'])\n @@ -108,6 +109,7 @@ return [ReportSection(\n at_date=at_date,\n from_date=from_date,\n payment_mode=payment_mode,\n + gap_root=gap_root,\n payment=payment))]\n @@ -162,6 +164,7 @@ return [ReportSection(\n <string>section_uid</string> <string>payment_mode</string> <string>payment</string> + <string>gap_root</string> <string>currency</string> <string>precision</string> <string>len</string> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.xml index ec966a8a3cd965b1a84969c64e1fc0a7c31f3d7c..ef0ed148fa86ced5f6d99a1a6d77d310c7002998 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.xml @@ -66,10 +66,19 @@ if payment:\n account_title_cache = dict()\n def getAccountId(node_relative_url):\n if node_relative_url not in account_title_cache:\n - title = portal.restrictedTraverse(node_relative_url).Account_getGapId()\n + title = portal.restrictedTraverse(node_relative_url).Account_getGapId(gap_root=gap_root)\n account_title_cache[node_relative_url] = title\n return account_title_cache[node_relative_url]\n \n +\n +account_in_gap_root_cache = dict()\n +def isAccountInGapRoot(node_relative_url):\n + if node_relative_url not in account_in_gap_root_cache:\n + is_in = portal.restrictedTraverse(node_relative_url).isMemberOf(gap_root)\n + account_in_gap_root_cache[node_relative_url] = is_in\n + return account_in_gap_root_cache[node_relative_url]\n +\n +\n displayed_transaction = dict()\n total_credit = 0\n total_debit = 0\n @@ -90,8 +99,12 @@ for brain in portal.portal_simulation.getMovementHistoryList(\n (\'parent_uid\', \'descending\'),\n (\'stock.total_price\', \'descending\')),\n **extra_kw):\n + if gap_root and not isAccountInGapRoot(brain.node_relative_url):\n + continue\n +\n debit = max(brain.total_price, 0) or 0\n credit = max(-(brain.total_price or 0), 0) or 0\n + \n mvt = brain.getObject()\n if payment_mode and not \\\n mvt.getPaymentMode(\'\').startswith(payment_mode):\n @@ -153,7 +166,7 @@ return line_list\n </item> <item> <key> <string>_params</string> </key> - <value> <string>selection, at_date, from_date, portal_type, simulation_state, section_uid, payment_mode=None, payment=None, **kw</string> </value> + <value> <string>selection, at_date, from_date, portal_type, simulation_state, section_uid, payment_mode=None, payment=None, gap_root=None, **kw</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -173,7 +186,7 @@ return line_list\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>8</int> </value> + <value> <int>9</int> </value> </item> <item> <key> <string>co_varnames</string> </key> @@ -187,6 +200,7 @@ return line_list\n <string>section_uid</string> <string>payment_mode</string> <string>payment</string> + <string>gap_root</string> <string>kw</string> <string>Products.PythonScripts.standard</string> <string>Object</string> @@ -201,6 +215,8 @@ return line_list\n <string>_write_</string> <string>account_title_cache</string> <string>getAccountId</string> + <string>account_in_gap_root_cache</string> + <string>isAccountInGapRoot</string> <string>displayed_transaction</string> <string>total_credit</string> <string>total_debit</string> @@ -233,6 +249,7 @@ return line_list\n <tuple> <none/> <none/> + <none/> </tuple> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalDialog.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalDialog.xml index af54e674fe871f405b8de0f24fe6de996794dd4e..b557636fce546618542b8799d61373050f433f1b 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalDialog.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalDialog.xml @@ -68,6 +68,7 @@ <list> <string>your_payment</string> <string>your_payment_mode</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalDialog/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalDialog/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..611e7e97e5587d602ee297d7b792ac40a32a535d --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalDialog/your_gap_root.xml @@ -0,0 +1,87 @@ +<?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>id</string> </key> + <value> <string>your_gap_root</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>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>your_gap_root</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>AccountModule_viewDialogFieldLibrary</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> +</ZopeData> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalReport.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalReport.xml index bdc8eb3f608ce47b685f39dea5aa0f6801d9e920..b91fbc95f8bebea274768fc1bc79ee9291d7d869 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalReport.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalReport.xml @@ -93,6 +93,7 @@ <string>your_payment</string> <string>your_payment_mode</string> <string>your_simulation_state</string> + <string>your_gap_root</string> </list> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalReport/your_gap_root.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalReport/your_gap_root.xml new file mode 100644 index 0000000000000000000000000000000000000000..46fa6d53a74c33bec006761e94750bc72c931355 --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewJournalReport/your_gap_root.xml @@ -0,0 +1,93 @@ +<?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/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>your_gap_root</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>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>your_gap_root</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>AccountModule_viewReportFieldLibrary</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> +</ZopeData> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 0dd217acf8ca7a81b51b27dcd6a53653c0bfd5fb..fea1e3e73cb9d3da273d8a59e99a6ef68ed0d7af 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -880 \ No newline at end of file +882 \ No newline at end of file