changeset 6b25aefed1a6 in modules/stock_secondary_unit:default
details:
https://hg.tryton.org/modules/stock_secondary_unit?cmd=changeset&node=6b25aefed1a6
description:
Send only the required fields when fetching a readonly view definition
issue11134
review380081002
diffstat:
stock.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (33 lines):
diff -r 9235a2bc8d67 -r 6b25aefed1a6 stock.py
--- a/stock.py Wed Apr 06 23:37:44 2022 +0200
+++ b/stock.py Fri Apr 08 19:07:14 2022 +0200
@@ -16,8 +16,7 @@
'invisible': ~Eval('secondary_unit'),
'readonly': Eval('state').in_(
['cancelled', 'assigned', 'done']),
- },
- depends=['secondary_unit', 'state']),
+ }),
'on_change_with_secondary_quantity', setter='set_secondary')
secondary_unit = fields.Many2One(
'product.uom', "Secondary Unit", ondelete='RESTRICT',
@@ -27,8 +26,7 @@
states={
'invisible': ~Eval('product_secondary_uom_category'),
'readonly': Eval('state').in_(['cancelled', 'assigned', 'done']),
- },
- depends=['product_secondary_uom_category', 'state'])
+ })
secondary_unit_price = fields.Function(
Monetary(
"Secondary Unit Price", currency='currency', digits=price_digits,
@@ -36,8 +34,7 @@
'invisible': (~Eval('unit_price_required')
| ~Eval('secondary_unit')),
'readonly': Eval('state') != 'draft',
- },
- depends=['unit_price_required', 'secondary_unit', 'state']),
+ }),
'on_change_with_secondary_unit_price', setter='set_secondary')
product_secondary_uom_category = fields.Function(