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 429e4ebc6f9eb0f4278ca6468f7e3ebd44cd37e3..474e6f8bbc49bfcd3e979d633d8256d0285df1d4 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 @@ -88,6 +88,9 @@ inventory_params = dict(section_uid=section_uid,\n simulation_state=simulation_state,\n precision=precision,\n group_by_resource=0)\n +if node_uid:\n + inventory_params[\'node_uid\'] = node_uid\n +\n MARKER = Object()\n \n # a dictionary (node_relative_url, mirror_section_uid, payment_uid)\n @@ -602,7 +605,7 @@ return 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, **kw</string> </value> + <value> <string>show_empty_accounts, expand_accounts, at_date, from_date, period_start_date, section_uid, simulation_state, precision, node_uid, **kw</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -622,7 +625,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> @@ -636,6 +639,7 @@ return line_list\n <string>section_uid</string> <string>simulation_state</string> <string>precision</string> + <string>node_uid</string> <string>kw</string> <string>Products.PythonScripts.standard</string> <string>Object</string> @@ -657,6 +661,7 @@ return line_list\n <string>accounting_movement_type_list</string> <string>dict</string> <string>inventory_params</string> + <string>_write_</string> <string>MARKER</string> <string>line_per_account</string> <string>account_used</string> @@ -672,7 +677,6 @@ return line_list\n <string>total_final_balance_if_credit</string> <string>_apply_</string> <string>node</string> - <string>_write_</string> <string>_getitem_</string> <string>account_props</string> <string>round</string> @@ -688,7 +692,6 @@ return line_list\n <string>mirror_section_uid</string> <string>payment_uid</string> <string>data</string> - <string>node_uid</string> <string>node_title</string> <string>node_id</string> <string>None</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 3d27d717df0449382222d64390ca1187d0715e4d..df4484cc081f8d9461500cb97078b870c97ed265 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 @@ -86,7 +86,7 @@ section_uid = portal.Base_getSectionUidListForSectionCategory(\n request[\'section_category\'])\n \n period_start_date = portal.Base_getAccountingPeriodStartDateForSectionCategory(\n - section_category=request[\'section_category\'], date=from_date or at_date)\n + section_category=request[\'section_category\'], date=from_date or at_date)\n # for the report summary\n request.set(\'period_start_date\', period_start_date)\n \n @@ -98,6 +98,15 @@ currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n precision = portal.account_module.getQuantityPrecisionFromResource(currency)\n request.set(\'precision\', precision)\n \n +\n +# optional GAP filter\n +node_uid = []\n +gap = request.get(\'gap\', None)\n +if gap:\n + gap_value = portal.portal_categories.gap.restrictedTraverse(gap)\n + node_uid = [x.uid for x in gap_value.getCategoryMemberValueList(\n + portal_type=\'Account\')]\n +\n request.set(\'is_accounting_report\', True)\n \n # flat_mode is a boolean that indicate wether we should use a report tree or a\n @@ -118,7 +127,8 @@ return [ ReportSection(\n period_start_date.earliestTime(),\n section_uid=section_uid,\n simulation_state=simulation_state,\n - precision=precision ),) ]\n + precision=precision,\n + node_uid=node_uid), )]\n </string> </value> </item> <item> @@ -186,6 +196,13 @@ return [ ReportSection(\n <string>period_start_date</string> <string>currency</string> <string>precision</string> + <string>node_uid</string> + <string>gap</string> + <string>gap_value</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>x</string> <string>True</string> <string>dict</string> </tuple> 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 22d01532bcc7c80bcf4cedb8955e1e9f8533f9ff..b8a83a4cc8336300a3f4bec1aa9babfbd32f4804 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 @@ -80,7 +80,9 @@ <item> <key> <string>center</string> </key> <value> - <list/> + <list> + <string>your_gap</string> + </list> </value> </item> <item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog/your_gap.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog/your_gap.xml new file mode 100644 index 0000000000000000000000000000000000000000..44bfd3e8bf973cd22d937467e56a452480b3a43a --- /dev/null +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewTrialBalanceReportDialog/your_gap.xml @@ -0,0 +1,289 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.StandardFields</string> + <string>ListField</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_gap</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></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</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.Account_getGapItemList()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index ac7cd1ac708f39a4800c68c43a53d17b65a2ce07..f3a5e81bae44f61651a487c649ecc541c10861e7 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -279 \ No newline at end of file +281 \ No newline at end of file