From 2ed42c3e2e60a0215229b94a6cf5ce7406a3b011 Mon Sep 17 00:00:00 2001 From: Goaman Date: Wed, 22 May 2019 14:05:22 +0000 Subject: [PATCH] [FIX] account: create a writeoff in reconciliation widget The method _renderCreate in the ManualLineRenderer was executed before the call to super finished. Which makes impossible to create a writeoff in the reconciliation widget. closes odoo/odoo#33582 Signed-off-by: Cedric Snauwaert (csn) --- .../src/js/reconciliation/reconciliation_renderer.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js index b59b99bc881..53cd0b76598 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js @@ -938,10 +938,12 @@ var ManualLineRenderer = LineRenderer.extend({ * @override */ _renderCreate: function (state) { - var parentPromise = this._super(state); - this.$('.create .create_journal_id').show(); - this.$('.create .create_date').removeClass('d-none'); - this.$('.create .create_journal_id .o_input').addClass('o_required_modifier'); + var self = this; + var parentPromise = this._super(state).then(function() { + self.$('.create .create_journal_id').show(); + self.$('.create .create_date').removeClass('d-none'); + self.$('.create .create_journal_id .o_input').addClass('o_required_modifier'); + }); return parentPromise; },