diff --git a/addons/account/models/account.py b/addons/account/models/account.py index 4642cacd9b5..0a274a89275 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -994,6 +994,7 @@ class AccountTax(models.Model): 'refund_account_id': tax.refund_account_id.id, 'analytic': tax.analytic, 'price_include': tax.price_include, + 'tax_exigibility': tax.tax_exigibility, }) return { diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 67ec719a655..ca1dfbd98a2 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1313,6 +1313,8 @@ class AccountMoveLine(models.Model): ctx['date'] = vals['date'] temp['currency_id'] = bank.currency_id.id temp['amount_currency'] = bank.company_id.currency_id.with_context(ctx).compute(tax_vals['amount'], bank.currency_id, round=True) + if vals.get('tax_exigible'): + temp['tax_exigible'] = True tax_lines_vals.append(temp) #Toggle the 'tax_exigible' field to False in case it is not yet given and the tax in 'tax_line_id' or one of diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js index 538b8c83369..9748f6c63e3 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_model.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js @@ -819,6 +819,7 @@ var StatementModel = BasicModel.extend({ prop.computed_with_tax = tax.price_include prop.tax_amount = tax.amount + prop.tax_exigible = tax.tax_exigibility === 'on_payment' ? true : undefined prop.amount = tax.base; prop.amount_str = field_utils.format.monetary(Math.abs(prop.amount), {}, formatOptions); prop.invalid = !self._isValid(prop); @@ -1105,6 +1106,7 @@ var StatementModel = BasicModel.extend({ name : prop.label, debit : amount > 0 ? amount : 0, credit : amount < 0 ? -amount : 0, + tax_exigible: prop.tax_exigible, // This one isn't usefull for the server, // But since we need to change the amount (and thus its semantics) into base_amount // It might be useful to have a trace in the RPC for debugging purposes