From 52307daca9f906b157657b79e6bcf3ba1f07b802 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 8 Jun 2017 03:37:08 +0000
Subject: [PATCH] budget: do not put budget lines/cells in predicate table for
 now

What we put in predicate table is not usable yet, so the end result is
same if we put nothing and putting nothing saves us from some
perfomance problems.
---
 .../portal_skins/erp5_budget/BudgetCell_asPredicate.py        | 3 +++
 .../portal_skins/erp5_budget/BudgetLine_asPredicate.py        | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetCell_asPredicate.py b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetCell_asPredicate.py
index 91a8b65ef4..921c5bc7a3 100644
--- a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetCell_asPredicate.py
+++ b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetCell_asPredicate.py
@@ -1,3 +1,6 @@
+# We don't have good implementation of budget predicate yet, so don't fill predicate table for now.
+return None
+
 # XXX strict membership is missing ?
 # ideally strict membership should be an option for each category, but this API
 # does not exist in predicates.
diff --git a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_asPredicate.py b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_asPredicate.py
index fecc865080..0657e2979a 100644
--- a/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_asPredicate.py
+++ b/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_asPredicate.py
@@ -1,3 +1,7 @@
+# We don't have good implementation of budget predicate yet, so don't fill predicate table for now.
+return None
+
+
 context = context.asContext(
              _range_criterion = {'start_date': (context.getStartDateRangeMin(),
                                                 context.getStartDateRangeMax())
-- 
2.30.9