Commit 30f5b4f5 authored by Jérome Perrin's avatar Jérome Perrin

support NULL values for "All others" node budget variation


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37746 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 798fe0a6
...@@ -30,7 +30,7 @@ from AccessControl import ClassSecurityInfo ...@@ -30,7 +30,7 @@ from AccessControl import ClassSecurityInfo
from AccessControl.ZopeGuards import guarded_getattr from AccessControl.ZopeGuards import guarded_getattr
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.BudgetVariation import BudgetVariation from Products.ERP5.Document.BudgetVariation import BudgetVariation
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery, ComplexQuery
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
...@@ -160,7 +160,10 @@ class NodeBudgetVariation(BudgetVariation): ...@@ -160,7 +160,10 @@ class NodeBudgetVariation(BudgetVariation):
if '%s/%s' % (base_category, node.getRelativeUrl()) in\ if '%s/%s' % (base_category, node.getRelativeUrl()) in\
budget_line.getVariationCategoryList(): budget_line.getVariationCategoryList():
other_uid_list.append(node.getUid()) other_uid_list.append(node.getUid())
return {axis: NegatedQuery(Query(**{axis: other_uid_list}))} return {axis: ComplexQuery(
NegatedQuery(Query(**{axis: other_uid_list})),
Query(**{axis: None}),
operator="OR")}
return {axis: return {axis:
portal_categories.getCategoryValue(node_url, base_category=criterion_base_category).getUid()} portal_categories.getCategoryValue(node_url, base_category=criterion_base_category).getUid()}
......
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