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

        issue11134
        review380081002
diffstat:

 stock.py |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (36 lines):

diff -r 03fdd68fed45 -r 16c1f78214c1 stock.py
--- a/stock.py  Wed Apr 06 23:37:44 2022 +0200
+++ b/stock.py  Fri Apr 08 19:07:14 2022 +0200
@@ -30,29 +30,25 @@
 
     carrier = fields.Many2One('carrier', 'Carrier', states={
             'readonly': Eval('state').in_(['done', 'cancelled']),
-            },
-        depends=['state'])
+            })
 
     cost_used = fields.Function(fields.Numeric(
             "Cost", digits=price_digits,
             states={
                 'invisible': Eval('cost_edit', False),
-                },
-            depends=['cost_edit']),
+                }),
         'on_change_with_cost_used')
     cost = fields.Numeric(
         "Cost", digits=price_digits,
         states={
             'invisible': ~Eval('cost_edit', False),
             'readonly': Eval('state').in_(['done', 'cancelled']),
-            },
-        depends=['state'])
+            })
     cost_edit = fields.Boolean(
         "Edit Cost",
         states={
             'readonly': Eval('state').in_(['done', 'cancelled']),
             },
-        depends=['state'],
         help="Check to edit the cost.")
 
     def _get_carrier_context(self):

Reply via email to