Add missing domain on account type
All the tree of account type must be in the same company
This commit is contained in:
1 parent
a13c63f8a9
commit
33cdcc59ad
1 file changed
+7
-2
+7
-2
@@ -152,8 +152,13 @@ class Type(ModelSQL, ModelView):
|
||||
_description = __doc__
|
||||
name = fields.Char('Name', size=None, required=True, translate=True)
|
||||
parent = fields.Many2One('account.account.type', 'Parent',
|
||||
ondelete="RESTRICT")
|
||||
childs = fields.One2Many('account.account.type', 'parent', 'Children')
|
||||
ondelete="RESTRICT", domain=[
|
||||
('company', '=', Eval('company')),
|
||||
])
|
||||
childs = fields.One2Many('account.account.type', 'parent', 'Children',
|
||||
domain=[
|
||||
('company', '=', Eval('company')),
|
||||
])
|
||||
sequence = fields.Integer('Sequence', required=True,
|
||||
help='Use to order the account type')
|
||||
currency_digits = fields.Function(fields.Integer('Currency Digits'),
|
||||
|
||||
Reference in new issue
Block a user