From 72efa730e2dbce58f8ed85229fbe1a43c7ddf422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 8 Apr 2022 19:07:13 +0200 Subject: [PATCH] Send only the required fields when fetching a readonly view definition issue11134 review380081002 --- product.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/product.py b/product.py index b48712fd60..86095ebb4d 100644 --- a/product.py +++ b/product.py @@ -86,8 +86,7 @@ class Product(ImageURLMixin, metaclass=PoolMeta): 'product.image', 'product', "Images", domain=[ ('template', '=', Eval('template', -1)), - ], - depends=['template']) + ]) @property def images_used(self): @@ -114,16 +113,14 @@ class Image(ImageMixin, sequence_ordered(), ModelSQL, ModelView, MatchMixin): If(Bool(Eval('product')), ('products', '=', Eval('product')), ()), - ], - depends=['product']) + ]) product = fields.Many2One( 'product.product', "Variant", select=True, domain=[ If(Bool(Eval('template')), ('template', '=', Eval('template')), ()), - ], - depends=['template']) + ]) cache = fields.One2Many( 'product.image.cache', 'product_image', "Cache", readonly=True)