changeset 743f15de74de in modules/product_kit:default
details:
https://hg.tryton.org/modules/product_kit?cmd=changeset&node=743f15de74de
description:
Send only the required fields when fetching a readonly view definition
issue11134
review380081002
diffstat:
common.py | 3 +--
product.py | 11 ++++-------
2 files changed, 5 insertions(+), 9 deletions(-)
diffs (54 lines):
diff -r b411c613fca2 -r 743f15de74de common.py
--- a/common.py Wed Apr 06 23:37:43 2022 +0200
+++ b/common.py Fri Apr 08 19:07:13 2022 +0200
@@ -269,8 +269,7 @@
"Quantity Ratio", readonly=True,
states={
'required': ~Eval('fixed', False),
- },
- depends=['fixed'])
+ })
price_ratio = fields.Numeric(
"Price Ratio", readonly=True, required=True)
diff -r b411c613fca2 -r 743f15de74de product.py
--- a/product.py Wed Apr 06 23:37:43 2022 +0200
+++ b/product.py Fri Apr 08 19:07:13 2022 +0200
@@ -147,8 +147,7 @@
If(Eval('parent_type') == 'kit',
('type', '=', 'goods'),
()),
- ],
- depends=['parent_type'])
+ ])
product_unit_category = fields.Function(
fields.Many2One('product.uom.category', "Product Unit Category"),
'on_change_with_product_unit_category')
@@ -159,7 +158,7 @@
('category', '=', Eval('product_unit_category')),
('category', '!=', -1)),
],
- depends=['product', 'product_unit_category'])
+ depends={'product'})
fixed = fields.Boolean("Fixed",
help="Check to make the quantity of the component independent "
"of the kit quantity.")
@@ -231,16 +230,14 @@
If(Bool(Eval('parent_product')),
('products', '=', Eval('parent_product')),
()),
- ],
- depends=['parent_product'])
+ ])
parent_product = fields.Many2One(
'product.product', "Parent Variant", ondelete='CASCADE', select=True,
domain=[
If(Bool(Eval('parent_template')),
('template', '=', Eval('parent_template')),
()),
- ],
- depends=['parent_template'])
+ ])
@classmethod
def __setup__(cls):