Commit 126590eb authored by Jérome Perrin's avatar Jérome Perrin

if we want to make it possible to extend account_type/expense and...

if we want to make it possible to extend account_type/expense and account_type/income, we have to do it differently, because this report depends on the fact that node_category and node_category_strict_membership are used in the same time, which only takes nodes that are member of boths node_category and node_category_strict_membership.
This repairs GL with GAP filtering

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34336 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dfd972b0
...@@ -168,9 +168,12 @@ account_type_to_group_by_node = [\n ...@@ -168,9 +168,12 @@ account_type_to_group_by_node = [\n
\'account_type/equity\',\n \'account_type/equity\',\n
\'account_type/liability\',]\n \'account_type/liability\',]\n
\n \n
profit_and_loss_account_type = [\n profit_and_loss_account_type = []\n
\'account_type/expense\',\n for account_type_value in (cat_tool.account_type.expense,\n
\'account_type/income\',]\n cat_tool.account_type.income):\n
profit_and_loss_account_type.extend(\n
[category.getRelativeUrl() for category in\n
account_type_value.getIndexableChildValueList()])\n
\n \n
account_type_to_group_by_payment = [ \'account_type/asset/cash/bank\' ]\n account_type_to_group_by_payment = [ \'account_type/asset/cash/bank\' ]\n
\n \n
...@@ -255,10 +258,9 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -255,10 +258,9 @@ for inventory in portal.portal_simulation.getInventoryList(\n
\'ascending\')]))\n \'ascending\')]))\n
\n \n
\n \n
\n
# profit & loss -> same, but from date limited to the current period\n # profit & loss -> same, but from date limited to the current period\n
for inventory in portal.portal_simulation.getInventoryList(\n for inventory in portal.portal_simulation.getInventoryList(\n
node_category=profit_and_loss_account_type,\n node_category_strict_membership=profit_and_loss_account_type,\n
portal_type=portal.getPortalAccountingMovementTypeList(),\n portal_type=portal.getPortalAccountingMovementTypeList(),\n
from_date=max(from_date, period_start_date),\n from_date=max(from_date, period_start_date),\n
at_date=at_date,\n at_date=at_date,\n
...@@ -513,11 +515,15 @@ return report_section_list\n ...@@ -513,11 +515,15 @@ return report_section_list\n
<string>getFullAccountName</string> <string>getFullAccountName</string>
<string>account_type_to_group_by_node</string> <string>account_type_to_group_by_node</string>
<string>profit_and_loss_account_type</string> <string>profit_and_loss_account_type</string>
<string>_getiter_</string>
<string>account_type_value</string>
<string>append</string>
<string>$append0</string>
<string>category</string>
<string>account_type_to_group_by_payment</string> <string>account_type_to_group_by_payment</string>
<string>account_type_to_group_by_mirror_section</string> <string>account_type_to_group_by_mirror_section</string>
<string>report_section_list</string> <string>report_section_list</string>
<string>existing_section_dict</string> <string>existing_section_dict</string>
<string>_getiter_</string>
<string>_apply_</string> <string>_apply_</string>
<string>inventory</string> <string>inventory</string>
<string>key</string> <string>key</string>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment