Send only the required fields when fetching a readonly view definition

issue11134
review380081002
This commit is contained in:
Nicolas Évrard
2022-04-08 19:07:14 +02:00
parent 6699059491
commit 8a2ba0851e
+2 -4
View File
@@ -17,8 +17,7 @@ class Location(metaclass=PoolMeta):
"Movable", select=True,
states={
'invisible': Eval('type') != 'storage',
},
depends=['type'])
})
assigned_by = fields.Reference(
"Assigned by", 'get_assigned_by', readonly=True)
@@ -119,8 +118,7 @@ class ShipmentInternal(metaclass=PoolMeta):
states={
'readonly': (~Eval('state').in_(['request', 'draft'])
| ~Eval('from_location') | ~Eval('to_location')),
},
depends=['state', 'from_location', 'to_location'])
})
@classmethod
@ModelView.button