From e953f2df55f84fbec87643f10b31b2f68bbe6a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 14 Jan 2008 10:56:28 +0000 Subject: [PATCH] The API changed. test method now have a "tested_base_category_list" parameter. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18680 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Interface/Predicate.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/product/ERP5/Interface/Predicate.py b/product/ERP5/Interface/Predicate.py index 37e2c85c7e..9936dfa1f5 100644 --- a/product/ERP5/Interface/Predicate.py +++ b/product/ERP5/Interface/Predicate.py @@ -45,11 +45,14 @@ class Predicate(Interface): implemented by subclasses. """ - def test(context): - """ - A Predicate can be tested on a given context + def test(context, tested_base_category_list=None): + """A Predicate can be tested on a given context. + + Parameters can passed in order to ignore some conditions: + - tested_base_category_list: this is the list of category that we do + want to test. For example, we might want to test only the + destination or the source of a predicate. """ - pass def asSQLExpression(): """ @@ -57,4 +60,4 @@ class Predicate(Interface): can be useful to create reporting trees based on the ZSQLCatalog """ - pass + -- 2.30.9