From abe6df6a5eb3ec8836caecc676956bde902f437d Mon Sep 17 00:00:00 2001 From: David Blanco Bautista Date: Wed, 6 Oct 2021 16:24:25 +0200 Subject: [PATCH] Implement get_rec_name in products by location and in lots by location issue10525 review371171002 --- location.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/location.py b/location.py index 7d05ca7650..faa3658b0e 100644 --- a/location.py +++ b/location.py @@ -788,6 +788,13 @@ class ProductsByLocations(DeactivableMixin, ModelSQL, ModelView): columns.append(column.as_(fname)) return product.select(*columns) + def get_rec_name(self, name): + return self.product.rec_name + + @classmethod + def search_rec_name(cls, name, clause): + return [('product.rec_name',) + tuple(clause[1:])] + def get_product(self, name): value = getattr(self.product, name) if isinstance(value, Model):