[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:
Vincent Schippefilt
2018-03-05 09:33:39 +01:00
committed by aab-odoo
parent 7102362803
commit 02eef78bbd
2 changed files with 2 additions and 4 deletions
@@ -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);
+1 -1
View File
@@ -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();
});