[FIX] web : remove useless reload of failed _callButtonAction
Before this fix, when a _callButtonAction failed, it would reload the model. After this fix we will not reload if a _callButtonAction fails
This commit is contained in:
committed by
aab-odoo
parent
7102362803
commit
02eef78bbd
@@ -254,9 +254,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
|
||||
resIDs: record.res_ids,
|
||||
},
|
||||
on_success: def.resolve.bind(def),
|
||||
on_fail: function () {
|
||||
reload().always(def.reject.bind(def));
|
||||
},
|
||||
on_fail: def.reject.bind(def),
|
||||
on_closed: reload,
|
||||
});
|
||||
return this.alive(def);
|
||||
|
||||
@@ -1032,7 +1032,7 @@ QUnit.module('Views', {
|
||||
});
|
||||
form.$('.o_form_statusbar button.s').click();
|
||||
|
||||
assert.strictEqual(rpcCount, 2, "should have done 2 rpcs to reload");
|
||||
assert.strictEqual(rpcCount, 1, "should have done 1 rpc, because we do not reload anymore if the server action fails");
|
||||
form.destroy();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user