From e9ebea399b3b8dac23bb202f8b56adb2bbbe43d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Todorovich?= Date: Tue, 9 Apr 2019 15:04:13 +0000 Subject: [PATCH] FIX self[0] in _rule_group --- base_exception/models/base_exception.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/base_exception/models/base_exception.py b/base_exception/models/base_exception.py index d3619e104..8c1b706fa 100644 --- a/base_exception/models/base_exception.py +++ b/base_exception/models/base_exception.py @@ -194,14 +194,13 @@ class BaseException(models.AbstractModel): if hasattr(exception_obj, field.name) ] or [None])[0] + @api.multi def _rule_domain(self): """Filter exception.rules. - By default, only the rules with the correct rule group will be used. """ - # TODO fix self[0] : it may not be the same on all ids in self - return [('rule_group', '=', self[0].rule_group)] + return [('rule_group', 'in', self.mapped('rule_group'))] @api.multi def detect_exceptions(self):