summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-10-01 14:22:05 +0000
committerNicolas Martinelli <nim@odoo.com>2018-10-02 11:15:51 +0000
commitbe6bcae8482dd4305dbdceba88ebe218aa29b3d7 (patch)
tree18c3b7c39c6b182c80e7c2e5bf269902e9554673
parent9cf22e5ef6e3e5f28b10d9be37a2c04b77785c0b (diff)
[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
-rw-r--r--addons/account/static/src/js/reconciliation/reconciliation_renderer.js5
1 files changed, 4 insertions, 1 deletions
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