From be6bcae8482dd4305dbdceba88ebe218aa29b3d7 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 1 Oct 2018 14:22:05 +0000 Subject: [PATCH] [FIX] account: reconcile error - From the accounting dashboard, click on the 'Reconcile' button of a bank journal - Click on the 'Bank reconciliation' text at the top left - Click on the 'OK' button that just appears A traceback occurs. This event is used to change the name of the statement, when clicking on 'Reconcile' from a bank statemet. In this case, it shouldn't do anything. opw-1883308 closes odoo/odoo#27359 --- .../static/src/js/reconciliation/reconciliation_renderer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js index f5927b617ac..bf50255cb8b 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js @@ -42,6 +42,7 @@ var StatementRenderer = Widget.extend(FieldManagerMixin, { var defs = [this._super.apply(this, arguments)]; this.time = Date.now(); this.$progress = this.$('.progress'); + this.clickStatementName = this._initialState.bank_statement_id ? true : false; if (this._initialState.bank_statement_id) { var def = this.model.makeRecord("account.bank.statement", [{ @@ -172,7 +173,9 @@ var StatementRenderer = Widget.extend(FieldManagerMixin, { * @private */ _onClickStatementName: function () { - this.$('.statement_name, .statement_name_edition').toggle(); + if (this.clickStatementName) { + this.$('.statement_name, .statement_name_edition').toggle(); + } }, /** * @private