Add domain on type of account to be in the same company

This commit is contained in:
Cédric Krier committed 2011-04-12 15:15:32 +02:00
1 parent c877e46e20
commit e54fd65c91
1 file changed
+3 -1
+3 -1
View File
@@ -535,7 +535,9 @@ class Account(ModelSQL, ModelView):
states={
'invisible': Equal(Eval('kind'), 'view'),
'required': Not(Equal(Eval('kind'), 'view')),
}, depends=['kind'])
}, domain=[
('company', '=', Eval('company')),
], depends=['kind', 'company'])
parent = fields.Many2One('account.account', 'Parent', select=1,
left="left", right="right", ondelete="RESTRICT")
left = fields.Integer('Left', required=True, select=1)