From 68fdd840a982be0271556dfd13e9c948d37cf49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 8 Oct 2024 14:38:40 +0200 Subject: [PATCH] Extend searchable of Template Function field instead of definition Since 4689fc76ddb7 the definition is based on the searchable result. --- modules/product/product.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/product/product.py b/modules/product/product.py index ba70f91b53..0bc842fae7 100644 --- a/modules/product/product.py +++ b/modules/product/product.py @@ -316,13 +316,10 @@ class TemplateFunction(fields.Function): name, tables['template'], Template) return order - def definition(self, model, language): + def searchable(self, model): pool = Pool() Template = pool.get('product.template') - definition = super().definition(model, language) - definition['searchable'] = self._field.definition( - Template, language)['searchable'] - return definition + return super().searchable(model) and self._field.searchable(Template) class TemplateDeactivatableMixin(DeactivableMixin):