Implement get_rec_name in products by location and in lots by location

issue10525
review371171002
This commit is contained in:
David Blanco Bautista committed 2021-10-06 16:24:25 +02:00
1 parent 5114196fde
commit abe6df6a5e
1 file changed
+7
+7
View File
@@ -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):