diff --git a/product/ERP5/mixin/rule.py b/product/ERP5/mixin/rule.py index 33987e0c514bb8bf7088b894c8a4487ab5c15a61..71d197db47b843f63e17407a3076a6bbebfb0cc3 100644 --- a/product/ERP5/mixin/rule.py +++ b/product/ERP5/mixin/rule.py @@ -84,6 +84,14 @@ class RuleMixin: activate_kw=activate_kw) return context.get(id) + def test(self, *args, **kw): + """ + If no test method is defined, return False, to prevent infinite loop + """ + if not self.getTestMethodId(): + return False + return Predicate.test(self, *args, **kw) + def expand(self, applied_rule, **kw): """ Expand this applied rule to create new documents inside the