[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) <csn@openerp.com>
This commit is contained in:
Goaman
2019-05-22 14:44:43 +00:00
parent 97a21aeec1
commit 2ed42c3e2e
@@ -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;
},