From c7a664b810212fa4031fd0ad25d7b237caedefd3 Mon Sep 17 00:00:00 2001 From: moerradi Date: Thu, 14 Sep 2023 23:25:06 +0000 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#136196 X-original-commit: 77871dd434a912fab41e6cec674c272fe37bcf1d Signed-off-by: Brice Bartoletti (bib) Signed-off-by: Mohamed Erradi (moer) --- 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 e1eab7c42db..acafbf14f0c 100644 --- a/addons/account/models/account_tax.py +++ b/addons/account/models/account_tax.py @@ -1362,7 +1362,7 @@ class AccountTaxRepartitionLine(models.Model): document_type = fields.Selection(string="Related to", selection=[('invoice', 'Invoice'), ('refund', 'Refund')], required=True) account_id = fields.Many2one(string="Account", comodel_name='account.account', - domain="[('deprecated', '=', False), ('account_type', 'not in', ('asset_receivable', 'liability_payable'))]", + domain="[('deprecated', '=', False), ('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')