[FIX] web: reload view on fail after write/create with action button

Issue:
Invoicing -> Vendor bills
Create a record with reference=0 -> Register Payment
Create a second record with reference=0, at least one line with at least one tax -> Save
Edit -> change quantity in the line -> Register Payment -> the register fail
change the quantity again and change reference=1 -> Register Payment
The taxes is include twice
This commit is contained in:
Christophe Matthieu
2016-01-13 11:09:54 +01:00
parent fd57dd5713
commit 17424bd4c8
@@ -81,7 +81,6 @@ var WidgetButton = common.FormWidget.extend({
},
on_confirmed: function() {
var self = this;
var context = this.build_context();
return this.view.do_execute_action(
_.extend({}, this.node.attrs, {context: context}),
@@ -89,6 +88,8 @@ var WidgetButton = common.FormWidget.extend({
if (!_.isObject(reason)) {
self.view.recursive_reload();
}
}).fail(function () {
self.view.recursive_reload();
});
},
check_disable: function() {