[REF] mrp: adapt code after jQuery update
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
This commit is contained in:
committed by
Aaron Bohy
co-authored by
Aaron Bohy
Christophe Matthieu
Mathieu Duckerts-Antoine
David Monjoie
Martin Geubelle
svs-odoo
parent
f2a91f8cba
commit
edae92c880
@@ -68,7 +68,7 @@ var TimeCounter = AbstractField.extend({
|
||||
});
|
||||
}
|
||||
});
|
||||
return $.when(this._super.apply(this, arguments), def);
|
||||
return Promise.all([this._super.apply(this, arguments), def]);
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
|
||||
@@ -29,10 +29,10 @@ QUnit.module('mrp', {
|
||||
},
|
||||
}, function () {
|
||||
|
||||
QUnit.test("bullet_state: basic rendering", function (assert) {
|
||||
QUnit.test("bullet_state: basic rendering", async function (assert) {
|
||||
assert.expect(2);
|
||||
|
||||
var form = createView({
|
||||
var form = await createView({
|
||||
View: FormView,
|
||||
model: 'partner',
|
||||
data: this.data,
|
||||
@@ -51,10 +51,10 @@ QUnit.module('mrp', {
|
||||
form.destroy();
|
||||
});
|
||||
|
||||
QUnit.test("mrp_time_counter: basic rendering", function (assert) {
|
||||
QUnit.test("mrp_time_counter: basic rendering", async function (assert) {
|
||||
assert.expect(2);
|
||||
|
||||
var form = createView({
|
||||
var form = await createView({
|
||||
View: FormView,
|
||||
model: 'partner',
|
||||
data: this.data,
|
||||
@@ -66,7 +66,7 @@ QUnit.module('mrp', {
|
||||
mockRPC: function (route, args) {
|
||||
if (args.method === 'search_read' && args.model === 'mrp.workcenter.productivity') {
|
||||
assert.ok(true, "the widget should fetch the mrp.workcenter.productivity");
|
||||
return $.when([{
|
||||
return Promise.resolve([{
|
||||
date_start: '2017-01-01 08:00:00',
|
||||
date_end: '2017-01-01 10:00:00',
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user