From 9b4372ee9370e86146e9d4d445499855362f3677 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 17 Feb 2020 10:17:31 +0100 Subject: [PATCH] Search also on variant name when searching on template record name issue9026 review282891002 --- CHANGELOG | 2 ++ product.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 847393dd24..f00820235c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 --git a/product.py b/product.py index 29bc0f3ca3..5f6e5165d6 100644 --- a/product.py +++ b/product.py @@ -108,6 +108,10 @@ class Template( 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'