From f10fd8ee6a2d959a150a6d24b6fb3df72793fd9b 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. (grafted from 4712f4eebd77aa4cc1a2f21c204f68fd33d8c000) --HG-- branch : 7.0 --- 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 d8ff8151d1..cd1a2c1ead 100644 --- a/modules/product/product.py +++ b/modules/product/product.py @@ -313,13 +313,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 Product(