Add test on domain of relation fields

issue10794
This commit is contained in:
Raimon Esteve 2021-10-20 09:53:20 +02:00
parent 67a7ee84ec
commit 47f5f7e2cc

2
cms.py
View file

@ -110,7 +110,7 @@ class Menu(tree(), DeactivableMixin, ModelSQL, ModelView):
help='Hidden Large devices')
image = fields.Many2One('ir.attachment', 'Image',
domain=[
('resource.id', '=', Eval('id'), 'galatea.cms.menu')
('resource.id', '=', Eval('id', -1), 'galatea.cms.menu')
], depends = ['id'])
description = fields.Text('Description', translate=True)