From dd3e0a4c2ae90d22e04140055e8faef2fb7f53a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 22 Dec 2016 01:15:46 +0100 Subject: [PATCH] Improve assertion in convert_domain of Function field The field name from the domain could be a nested if the Function field is relational. So it must just if it starts with the name of the field. --- trytond/model/fields/function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/model/fields/function.py b/trytond/model/fields/function.py index be7e5e4e6b..73fb0d9d66 100644 --- a/trytond/model/fields/function.py +++ b/trytond/model/fields/function.py @@ -63,7 +63,7 @@ class Function(Field): def convert_domain(self, domain, tables, Model): name, operator, value = domain[:3] - assert name == self.name + assert name.startswith(self.name) method = getattr(Model, 'domain_%s' % name, None) if method: return method(domain, tables)