diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml index 221c0e1ee496e2f2334456b76acd813ec0cdd56f..625a26796955c94090c240249c17206bde8ba188 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml @@ -70,13 +70,24 @@ <key> <string>_body</string> </key> <value> <string>"""Return item list of accounts that can be used as node for this accounting\n transaction line.\n -The id of the line is used to filter the list. If `mirror` is set to a true\n -value, the list will be filtered for the mirror node.\n +The id of the line is used to filter the list, unless `omit_filter` is true.\n +If `mirror` is set to a true value, the list will be filtered for the mirror\n +node.\n """\n from Products.ERP5Type.Cache import CachingMethod\n portal = context.getPortalObject()\n \n -if not mirror:\n +if omit_filter:\n + category_dict = {\n + \'income\': \'account_type\',\n + \'expense\': \'account_type\',\n + \'payable\': \'account_type\',\n + \'receivable\': \'account_type\',\n + \'collected_vat\': \'account_type\',\n + \'refundable_vat\': \'account_type\',\n + \'bank\': \'account_type/asset\',\n + \'cash\': \'account_type/asset\', }\n +elif not mirror:\n category_dict = {\n \'income\': \'account_type/income\',\n \'expense\': \'account_type/expense\',\n @@ -87,7 +98,7 @@ if not mirror:\n \'bank\': \'account_type/asset/cash\',\n \'cash\': \'account_type/asset/cash\', }\n else:\n - category_dict = {\n + category_dict = {\n \'income\': \'account_type/expense\',\n \'expense\': \'account_type/income\',\n \'payable\': \'account_type/asset/receivable\',\n @@ -128,9 +139,6 @@ def getItemList(category=None, portal_path=None, mirror=0,\n base=0,\n display_method=display,\n sort_method=sort,\n - # we don\'t want strict membership if now category\n - # has been found.\n - strict_membership=0,\n filter=filter_dict)\n return item_list\n \n @@ -143,6 +151,7 @@ getItemList = CachingMethod(getItemList,\n return getItemList( category=category,\n portal_path=context.getPortalObject().getPhysicalPath(),\n mirror=mirror,\n + omit_filter=omit_filter, # XXX possible optim: only one cache if omit_filter\n user_name=context.REQUEST.AUTHENTICATED_USER,\n simulation_state=context.getProperty(\n \'simulation_state\', \'no_simulation_state\') )\n @@ -174,7 +183,7 @@ return getItemList( category=category,\n </item> <item> <key> <string>_params</string> </key> - <value> <string>mirror=0</string> </value> + <value> <string>mirror=0, omit_filter=0</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -194,13 +203,14 @@ return getItemList( category=category,\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>1</int> </value> + <value> <int>2</int> </value> </item> <item> <key> <string>co_varnames</string> </key> <value> <tuple> <string>mirror</string> + <string>omit_filter</string> <string>Products.ERP5Type.Cache</string> <string>CachingMethod</string> <string>_getattr_</string> @@ -227,6 +237,7 @@ return getItemList( category=category,\n <value> <tuple> <int>0</int> + <int>0</int> </tuple> </value> </item> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml index e9406fe3eabef9005d026293c90a8a1e1cbdbded..38bd3a209e4677482cc86923b4fda23b8ffe06bd 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewDestinationAsset/listbox_destination.xml @@ -281,7 +281,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList(mirror=1)</string> </value> + <value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList(omit_filter=1)</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml index 5a47862c30a0cb74b691e7c387c839e44edbc748..533690e1785c1e2a483ec0c750334b587e8acfda 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewSourceAsset/listbox_source.xml @@ -281,7 +281,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value> + <value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList(omit_filter=1)</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index d7f3668a68034370ad1e355d05f4659541b0db5e..d97edbb29fa140807215ea46cfdc2b84f4c97dcd 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -98 \ No newline at end of file +99 \ No newline at end of file