From e54fd65c9108c729d33244fc995e0b06f58ad1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 12 Apr 2011 15:15:32 +0200 Subject: [PATCH] Add domain on type of account to be in the same company --- account.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/account.py b/account.py index b4eafbf774..b4dbefbde7 100644 --- a/account.py +++ b/account.py @@ -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)