[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
This commit is contained in:
Nicolas Martinelli
2018-10-02 11:15:51 +00:00
parent 9cf22e5ef6
commit be6bcae848
@@ -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