diff options
| author | Christophe Matthieu <chm@odoo.com> | 2016-01-12 16:48:46 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2016-01-13 11:09:54 +0100 |
| commit | 17424bd4c8cb0fdf8a63c601633eaa9deeebb8e9 (patch) | |
| tree | 0318b1c9650b1013619af81f52b67c7a9ed541a6 | |
| parent | fd57dd5713b5a8af68f5fac0c50f058681da0880 (diff) | |
[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
| -rw-r--r-- | addons/web/static/src/js/views/form_widgets.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js index 96107503a5f..4d39d8df806 100644 --- a/addons/web/static/src/js/views/form_widgets.js +++ b/addons/web/static/src/js/views/form_widgets.js @@ -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() { |
