changeset 94ff6862211f in modules/production_outsourcing:default
details:
https://hg.tryton.org/modules/production_outsourcing?cmd=changeset&node=94ff6862211f
description:
Send only the required fields when fetching a readonly view definition
issue11134
review380081002
diffstat:
production.py | 5 +----
purchase.py | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 48be5cb29be0 -r 94ff6862211f production.py
--- a/production.py Wed Apr 06 23:37:43 2022 +0200
+++ b/production.py Fri Apr 08 19:07:13 2022 +0200
@@ -29,7 +29,7 @@
'required': Bool(Eval('supplier')),
'invisible': ~Eval('supplier'),
},
- depends=['supplier', 'supplier_service_supplier'],
+ depends={'supplier_service_supplier'},
help="The service to buy to the supplier for the production.")
supplier_service_supplier = fields.Many2One(
'purchase.product_supplier', "Supplier's Service",
@@ -50,14 +50,12 @@
states={
'invisible': ~Eval('supplier'),
},
- depends=['supplier_service', 'supplier'],
help="The supplier's service to buy for the production.")
supplier_quantity = fields.Float("Quantity",
states={
'invisible': ~Eval('supplier_service'),
'required': Bool(Eval('supplier_service')),
},
- depends=['supplier_service'],
help="The quantity to buy to produce one time the BOM.")
@classmethod
@@ -111,7 +109,6 @@
domain=[
('purchase.company', '=', Eval('company', -1)),
],
- depends=['company'],
help="The lines to add to the production cost.")
def get_cost(self, name):
diff -r 48be5cb29be0 -r 94ff6862211f purchase.py
--- a/purchase.py Wed Apr 06 23:37:43 2022 +0200
+++ b/purchase.py Fri Apr 08 19:07:13 2022 +0200
@@ -16,5 +16,5 @@
states={
'invisible': Eval('type') != 'line',
},
- depends=['type', 'purchase'],
+ depends={'purchase'},
help="Add to the cost of the production.")