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'