[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) <bib@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
This commit is contained in:
moerradi
2023-09-21 23:54:31 +00:00
parent 965e7039ef
commit c7a664b810
+1 -1
View File
@@ -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')