From 05ea6bf3a4bb94a78ca9114a8fa583a77f4eddf2 Mon Sep 17 00:00:00 2001 From: moerradi <moer@odoo.com> Date: Fri, 15 Sep 2023 00:25:06 +0100 Subject: [PATCH] [IMP] account: Exclude Off Balance Accounts from tax repartition lines This commit excludes off-balance accounts from appearing in tax repartition lines. Previously, off-balance accounts were included in the selection, which was causing confusion and unnecessary clutter in the interface. The need for this change was raised due to the observation that off-balance accounts are never actually used in tax repartition scenarios. Including them only complicates the account selection process without adding any functional value closes odoo/odoo#135763 Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com> --- addons/account/models/account_tax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_tax.py b/addons/account/models/account_tax.py index c3f5a5673c12..b46fddd81b17 100644 --- a/addons/account/models/account_tax.py +++ b/addons/account/models/account_tax.py @@ -1279,7 +1279,7 @@ class AccountTaxRepartitionLine(models.Model): repartition_type = fields.Selection(string="Based On", selection=[('base', 'Base'), ('tax', 'of tax')], required=True, default='tax', help="Base on which the factor will be applied.") account_id = fields.Many2one(string="Account", comodel_name='account.account', - domain="[('deprecated', '=', False), ('company_id', '=', company_id), ('account_type', 'not in', ('asset_receivable', 'liability_payable'))]", + domain="[('deprecated', '=', False), ('company_id', '=', company_id), ('account_type', 'not in', ('asset_receivable', 'liability_payable', 'off_balance'))]", check_company=True, help="Account on which to post the tax amount") tag_ids = fields.Many2many(string="Tax Grids", comodel_name='account.account.tag', domain=[('applicability', '=', 'taxes')], copy=True, ondelete='restrict') -- GitLab