[Erp5-report] r37746 jerome - /erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Aug 12 11:39:57 CEST 2010


Author: jerome
Date: Thu Aug 12 11:39:48 2010
New Revision: 37746

URL: http://svn.erp5.org?rev=37746&view=rev
Log:
support NULL values for "All others" node budget variation

Modified:
    erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py

Modified: erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py?rev=37746&r1=37745&r2=37746&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py [utf8] Thu Aug 12 11:39:48 2010
@@ -30,7 +30,7 @@ from AccessControl import ClassSecurityI
 from AccessControl.ZopeGuards import guarded_getattr
 from Products.ERP5Type import Permissions, PropertySheet
 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
 
 
@@ -160,7 +160,10 @@ class NodeBudgetVariation(BudgetVariatio
             if '%s/%s' % (base_category, node.getRelativeUrl()) in\
                                     budget_line.getVariationCategoryList():
               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:
                 portal_categories.getCategoryValue(node_url, base_category=criterion_base_category).getUid()}
 




More information about the Erp5-report mailing list