changeset 95e8e2530237 in modules/product:default
details: https://hg.tryton.org/modules/product?cmd=changeset&node=95e8e2530237
description:
        Set searchable for template function field

        The searchable property is inherited from the template field definition.

        issue9814
        review335831002
diffstat:

 product.py |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 06a13f72bc7d -r 95e8e2530237 product.py
--- a/product.py        Thu Mar 11 23:00:10 2021 +0100
+++ b/product.py        Wed Mar 24 00:02:15 2021 +0100
@@ -303,6 +303,14 @@
                 name, tables['template'], Template)
         return order
 
+    def definition(self, model, language):
+        pool = Pool()
+        Template = pool.get('product.template')
+        definition = super().definition(model, language)
+        definition['searchable'] = self._field.definition(
+            Template, language)['searchable']
+        return definition
+
 
 class Product(
         DeactivableMixin, ModelSQL, ModelView, CompanyMultiValueMixin):

Reply via email to