details: https://code.tryton.org/tryton/commit/b248187d9a59
branch: default
user: Cédric Krier <[email protected]>
date: Mon Sep 28 14:55:24 2026 +0200
description:
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
diffstat:
modules/project_disbursement/account.py | 2 ++
modules/project_disbursement/project.py | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diffs (30 lines):
diff -r 0fdec92fe796 -r b248187d9a59 modules/project_disbursement/account.py
--- a/modules/project_disbursement/account.py Tue Sep 29 15:31:30 2026 +0200
+++ b/modules/project_disbursement/account.py Mon Sep 28 14:55:24 2026 +0200
@@ -15,6 +15,7 @@
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 @@
default_account_disbursement = fields.Many2One(
'account.account', "Default Account Disbursement",
domain=[
+ ('type.disbursement', '=', True),
('closed', '!=', True),
('company', '=', Eval('company', -1)),
])
diff -r 0fdec92fe796 -r b248187d9a59 modules/project_disbursement/project.py
--- a/modules/project_disbursement/project.py Tue Sep 29 15:31:30 2026 +0200
+++ b/modules/project_disbursement/project.py Mon Sep 28 14:55:24 2026 +0200
@@ -61,6 +61,7 @@
account_disbursement = fields.Many2One(
'account.account', "Account Disbursement",
domain=[
+ ('type.disbursement', '=', True),
('closed', '!=', True),
('company', '=', Eval('company', -1)),
],