From 0f2292018e526f51d60e8cbb4de06e0ce6d9e2a5 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 7 Sep 2018 13:59:38 +0200 Subject: [PATCH] [FIX] account: manual reconciliation with tax In the Manual Reconciliation widget: - Link 2 entries that do not balance - Create the write-off line with a tax When reconciling, the following error occurs: "It is mandatory to specify an account and a journal to create a write-off." Two new lines are sent to the server: the write-off, and the tax of the write-off. The latter causes the issue, since it doesn't contain the field `journal_id`. Actually, the tax of the write-off is not necessary since the taxes will be recomputed automatically thanks to the context key `apply_taxes`. opw-1875822 --- .../static/src/js/reconciliation/reconciliation_model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js index 13f03c5db9e..538b8c83369 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_model.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js @@ -1264,7 +1264,8 @@ var ManualModel = StatementModel.extend({ }); } else { var mv_line_ids = _.pluck(_.filter(props, function (prop) {return !isNaN(prop.id);}), 'id'); - var new_mv_line_dicts = _.map(_.filter(props, function (prop) {return isNaN(prop.id) && prop.display;}), self._formatToProcessReconciliation.bind(self, line)); + // Dear KangOl, please FORWARD-PORT UP TO SAAS-11.3. Thank you for your hard work. + var new_mv_line_dicts = _.map(_.filter(props, function (prop) {return isNaN(prop.id) && prop.display && !prop.is_tax;}), self._formatToProcessReconciliation.bind(self, line)); process_reconciliations.push({ id: null, type: null,