changeset 31883463311b in modules/web_shop:default
details: https://hg.tryton.org/modules/web_shop?cmd=changeset&node=31883463311b
description:
        Send only the required fields when fetching a readonly view definition

        issue11134
        review380081002
diffstat:

 product.py |   1 -
 sale.py    |   3 +--
 web.py     |  16 +++++++---------
 3 files changed, 8 insertions(+), 12 deletions(-)

diffs (85 lines):

diff -r 895c459ace78 -r 31883463311b product.py
--- a/product.py        Wed Apr 06 23:37:45 2022 +0200
+++ b/product.py        Fri Apr 08 19:07:14 2022 +0200
@@ -25,7 +25,6 @@
         states={
             'invisible': ~Eval('salable'),
             },
-        depends=['salable'],
         help="The list of web shops on which the product is published.")
 
 
diff -r 895c459ace78 -r 31883463311b sale.py
--- a/sale.py   Wed Apr 06 23:37:45 2022 +0200
+++ b/sale.py   Fri Apr 08 19:07:14 2022 +0200
@@ -21,8 +21,7 @@
         states={
             'required': Bool(Eval('web_shop')),
             'readonly': ~Eval('web_id'),
-            },
-        depends=['web_shop'])
+            })
 
     @classmethod
     def __setup__(cls):
diff -r 895c459ace78 -r 31883463311b web.py
--- a/web.py    Wed Apr 06 23:37:45 2022 +0200
+++ b/web.py    Fri Apr 08 19:07:14 2022 +0200
@@ -69,7 +69,7 @@
         context={
             'company': Eval('company', -1),
             },
-        depends=['company'])
+        depends={'company'})
 
     products = fields.Many2Many(
         'web.shop-product.product', 'shop', 'product', "Products",
@@ -79,14 +79,14 @@
         context={
             'company': Eval('company', -1),
             },
-        depends=['company'],
+        depends={'company'},
         help="The list of products to publish.")
     products_removed = Many2ManyInactive(
         'web.shop-product.product', 'shop', 'product', "Products Removed",
         context={
             'company': Eval('company', -1),
             },
-        depends=['company'],
+        depends={'company'},
         help="The list of products to unpublish.")
 
     categories = fields.Many2Many(
@@ -94,14 +94,14 @@
         context={
             'company': Eval('company', -1),
             },
-        depends=['company'],
+        depends={'company'},
         help="The list of categories to publish.")
     categories_removed = Many2ManyInactive(
         'web.shop-product.category', 'shop', 'category', "Categories Removed",
         context={
             'company': Eval('company', -1),
             },
-        depends=['company'],
+        depends={'company'},
         help="The list of categories to unpublish.")
 
     _name_cache = Cache('web.shop.name', context=False)
@@ -325,12 +325,10 @@
         domain=['OR',
             ('party', '=', Eval('party', -1)),
             ('party', 'in', Eval('secondary_parties', [])),
-            ],
-        depends=['party', 'secondary_parties'])
+            ])
     shipment_address = fields.Many2One(
         'party.address', "Shipment Address",
         domain=['OR',
             ('party', '=', Eval('party', -1)),
             ('party', 'in', Eval('secondary_parties', [])),
-            ],
-        depends=['party', 'secondary_parties'])
+            ])

Reply via email to