Send only the required fields when fetching a readonly view definition

issue11134
review380081002
This commit is contained in:
Nicolas Évrard committed 2022-04-08 19:07:13 +02:00
1 parent aa300353a7
commit 6ec41d326d
2 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -15,5 +15,5 @@ class Line(metaclass=PoolMeta):
states={
'invisible': Eval('type') != 'line',
},
depends=['type', 'purchase'],
depends={'purchase'},
help="Add to the cost of the work effort.")
+2 -3
View File
@@ -24,7 +24,7 @@ class Work(metaclass=PoolMeta):
context={
'company': Eval('company', -1),
},
depends=['company'])
depends={'company'})
list_price = Monetary(
"List Price", currency='currency', digits=price_digits)
revenue = fields.Function(Monetary(
@@ -52,8 +52,7 @@ class Work(metaclass=PoolMeta):
'Purchase Lines', domain=[
('purchase.company', '=', Eval('company', -1)),
('type', '=', 'line'),
],
depends=['company'])
])
@classmethod
def _get_cost(cls, works):