From c19a0fe809b8e41b17ab6ff40182333d10aaa977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 Jul 2013 14:43:55 +0200 Subject: [PATCH] Fix domain composition between screen and attribute domains domains can not be summed because they can be of 'OR' type review985002 (transplanted from ba60f315fc3e9346c438edd10cdcc2470abd1317) --- tryton/gui/window/view_form/model/field.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py index cc4b2cc4bb..85af6a708b 100644 --- a/tryton/gui/window/view_form/model/field.py +++ b/tryton/gui/window/view_form/model/field.py @@ -58,13 +58,13 @@ class CharField(object): def domain_get(self, record): screen_domain, attr_domain = self.domains_get(record) - return localize_domain(screen_domain) + attr_domain + return [localize_domain(screen_domain), attr_domain] def validation_domains(self, record): screen_domain, attr_domain = self.domains_get(record) if attr_domain: - return (screen_domain, screen_domain + - unlocalize_domain(attr_domain, self.name)) + return (screen_domain, [screen_domain, + unlocalize_domain(attr_domain, self.name)]) else: return screen_domain, screen_domain @@ -453,8 +453,8 @@ class M2OField(CharField): def domain_get(self, record): screen_domain, attr_domain = self.domains_get(record) - return (localize_domain(inverse_leaf(screen_domain), self.name) - + attr_domain) + return [localize_domain(inverse_leaf(screen_domain), self.name), + attr_domain] def get_state_attrs(self, record): result = super(M2OField, self).get_state_attrs(record) @@ -760,7 +760,7 @@ class O2MField(CharField): def domain_get(self, record): screen_domain, attr_domain = self.domains_get(record) - return localize_domain(inverse_leaf(screen_domain)) + attr_domain + return [localize_domain(inverse_leaf(screen_domain)), attr_domain] class M2MField(O2MField):