Use dictionary as domain for Reference field

issue11074
review383911002
This commit is contained in:
Cédric Krier committed 2022-02-03 23:05:47 +01:00
1 parent 4ab69f60d4
commit 1e8fe4ea8e
1 file changed
+8 -3
+8 -3
View File
@@ -109,9 +109,14 @@ class Package(tree(), WeightMixin, ModelSQL, ModelView):
states={
'readonly': Eval('state') == 'closed',
},
domain=[
('company', '=', Eval('company', -1)),
],
domain={
'stock.shipment.out': [
('company', '=', Eval('company', -1)),
],
'stock.shipment.in.return': [
('company', '=', Eval('company', -1)),
],
},
depends=['state', 'company'])
moves = fields.One2Many('stock.move', 'package', 'Moves',
domain=[