changeset b98cd0632102 in modules/product:default
details: https://hg.tryton.org/modules/product?cmd=changeset;node=b98cd0632102
description:
        Search also on variant name when searching on template record name

        issue9026
        review282891002
diffstat:

 CHANGELOG  |  2 ++
 product.py |  4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (23 lines):

diff -r 02e8b1c7accf -r b98cd0632102 CHANGELOG
--- a/CHANGELOG Mon Jan 20 11:12:47 2020 +0100
+++ b/CHANGELOG Mon Feb 17 10:17:31 2020 +0100
@@ -1,3 +1,5 @@
+* Search also on variant name when searching on template record name
+
 Version 5.4.0 - 2019-11-04
 * Bug fixes (see mercurial logs for details)
 * Allow the product code to be set by a sequence
diff -r 02e8b1c7accf -r b98cd0632102 product.py
--- a/product.py        Mon Jan 20 11:12:47 2020 +0100
+++ b/product.py        Mon Feb 17 10:17:31 2020 +0100
@@ -108,6 +108,10 @@
             return pool.get('product.cost_price_method')
         return super(Template, cls).multivalue_model(field)
 
+    @classmethod
+    def search_rec_name(cls, name, clause):
+        return [('products.rec_name',) + tuple(clause[1:])]
+
     @staticmethod
     def default_type():
         return 'goods'

Reply via email to