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:
Cédric Krier
2026-09-28 14:55:24 +02:00
parent 5c389c3bb5
commit f219204eb6
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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)),
])
+1
View File
@@ -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)),
],