diff --git a/addons/account/models/account.py b/addons/account/models/account.py index e292ed69818..63d96de9aff 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -809,11 +809,17 @@ class AccountTax(models.Model): oldname='use_cash_basis', help="Based on Invoice: the tax is due as soon as the invoice is validated.\n" "Based on Payment: the tax is due as soon as the payment of the invoice is received.") - cash_basis_account = fields.Many2one( + cash_basis_account_id = fields.Many2one( 'account.account', string='Tax Received Account', domain=[('deprecated', '=', False)], + oldname='cash_basis_account', help='Account used as counterpart for the journal entry, for taxes eligible based on payments.') + cash_basis_base_account_id = fields.Many2one( + 'account.account', + domain=[('deprecated', '=', False)], + string='Base Tax Received Account', + help='Account that will be set on lines created in cash basis journal entry and used to keep track of the tax base amount.') _sql_constraints = [ ('name_company_uniq', 'unique(name, company_id, type_tax_use)', 'Tax names must be unique !'), diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 6b62949c332..6067d78c5cf 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1329,7 +1329,7 @@ class AccountPartialReconcile(models.Model): :param tax: An account.tax record :return: An account record ''' - return line.account_id + return tax.cash_basis_base_account_id or line.account_id def create_tax_cash_basis_entry(self, percentage_before_rec): self.ensure_one() diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py index d035fe594dc..5f5c38317b3 100644 --- a/addons/account/models/chart_template.py +++ b/addons/account/models/chart_template.py @@ -538,6 +538,11 @@ class AccountTaxTemplate(models.Model): string='Tax Received Account', domain=[('deprecated', '=', False)], help='Account used as counterpart for the journal entry, for taxes eligible based on payments.') + cash_basis_base_account_id = fields.Many2one( + 'account.account.template', + domain=[('deprecated', '=', False)], + string='Base Tax Received Account', + help='Account that will be set on lines created in cash basis journal entry and used to keep track of the tax base amount.') _sql_constraints = [ ('name_company_uniq', 'unique(name, company_id, type_tax_use, chart_template_id)', 'Tax names must be unique !'), diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index 4c8f7845379..c439cb91ba0 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -1128,6 +1128,7 @@ + diff --git a/addons/l10n_fr/data/account_tax_data.xml b/addons/l10n_fr/data/account_tax_data.xml index 4ec5e434cd8..5fb51c92067 100644 --- a/addons/l10n_fr/data/account_tax_data.xml +++ b/addons/l10n_fr/data/account_tax_data.xml @@ -515,7 +515,7 @@ on_payment - + sale @@ -573,7 +573,7 @@ on_payment - + sale @@ -603,7 +603,7 @@ on_payment - + sale @@ -637,7 +637,7 @@ on_payment - + sale @@ -699,7 +699,7 @@ on_payment - + sale @@ -731,7 +731,7 @@ on_payment - + sale diff --git a/addons/l10n_mx/data/account_tax_data.xml b/addons/l10n_mx/data/account_tax_data.xml index 168b1955609..02d65cbeb29 100644 --- a/addons/l10n_mx/data/account_tax_data.xml +++ b/addons/l10n_mx/data/account_tax_data.xml @@ -47,7 +47,7 @@ on_payment - + @@ -62,7 +62,7 @@ on_payment - + @@ -76,7 +76,7 @@ on_payment - + @@ -91,7 +91,7 @@ on_payment - + @@ -130,7 +130,7 @@ on_payment - + @@ -145,7 +145,7 @@ on_payment - + @@ -160,7 +160,7 @@ on_payment - + @@ -175,7 +175,7 @@ on_payment - +