[FIX] web: controller update now waits for _update to resolve
Before this, the deffered returned by _update was not taken into account.
This commit is contained in:
committed by
Yannick Tivisse
parent
c1498ff36b
commit
872cf9160d
@@ -91,7 +91,7 @@ var AbstractController = AbstractAction.extend(ControlPanelMixin, {
|
||||
this._super.apply(this, arguments),
|
||||
this.renderer.appendTo(this.$el)
|
||||
).then(function () {
|
||||
self._update(self.initialState);
|
||||
return self._update(self.initialState);
|
||||
});
|
||||
},
|
||||
/**
|
||||
@@ -257,7 +257,7 @@ var AbstractController = AbstractAction.extend(ControlPanelMixin, {
|
||||
return;
|
||||
}
|
||||
self.renderer.setLocalState(localState);
|
||||
self._update(state);
|
||||
return self._update(state);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -3690,6 +3690,9 @@ QUnit.module('basic_fields', {
|
||||
'</sheet>' +
|
||||
'</form>',
|
||||
res_id: 1,
|
||||
viewOptions: {
|
||||
disable_autofocus: true,
|
||||
},
|
||||
});
|
||||
|
||||
assert.strictEqual(form.$('.o_field_widget.o_selection > a span.o_status.o_status_red').length, 1,
|
||||
|
||||
Reference in New Issue
Block a user