Restrict account disbursement to account with disbursement type
It is needed to ensure that the account is valid when used on the invoice line. Closes #15128
This commit is contained in:
@@ -15,6 +15,7 @@ class Configuration(metaclass=PoolMeta):
|
||||
default_account_disbursement = fields.MultiValue(fields.Many2One(
|
||||
'account.account', "Default Account Disbursement",
|
||||
domain=[
|
||||
('type.disbursement', '=', True),
|
||||
('closed', '!=', True),
|
||||
('company', '=', Eval('context', {}).get('company', -1)),
|
||||
]))
|
||||
@@ -33,6 +34,7 @@ class ConfigurationDefaultAccount(metaclass=PoolMeta):
|
||||
default_account_disbursement = fields.Many2One(
|
||||
'account.account', "Default Account Disbursement",
|
||||
domain=[
|
||||
('type.disbursement', '=', True),
|
||||
('closed', '!=', True),
|
||||
('company', '=', Eval('company', -1)),
|
||||
])
|
||||
|
||||
@@ -61,6 +61,7 @@ class Work(metaclass=PoolMeta):
|
||||
account_disbursement = fields.Many2One(
|
||||
'account.account', "Account Disbursement",
|
||||
domain=[
|
||||
('type.disbursement', '=', True),
|
||||
('closed', '!=', True),
|
||||
('company', '=', Eval('company', -1)),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user