summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/view_dialogs.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-04-02 21:04:31 +0200
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commit9100e675dfe7ae60ea3c8f1a5ef1e9a78a4ab4c6 (patch)
tree08f98b2fe727ece38153afb99c99611baf2e9395 /addons/web/static/src/js/views/view_dialogs.js
parent0f96189b7fbc481b21f0b7b7a2fdcb82916d6bae (diff)
[FIX] web: add support for discarding lines in o2m
This is not a complete work, but it introduces the basic infrastructure to properly edit various more sophisticated editing behaviours. The main focus of this commit is to handle discarding invalid lines in one2many, potentially asking the user for confirmation. So, the relevant methods have to be modified to return some deferred, because the operation is now asynchronous.
Diffstat (limited to 'addons/web/static/src/js/views/view_dialogs.js')
-rw-r--r--addons/web/static/src/js/views/view_dialogs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/view_dialogs.js b/addons/web/static/src/js/views/view_dialogs.js
index fe7ddddaf10..6f0fe8328c3 100644
--- a/addons/web/static/src/js/views/view_dialogs.js
+++ b/addons/web/static/src/js/views/view_dialogs.js
@@ -207,7 +207,7 @@ var FormViewDialog = ViewDialog.extend({
var self = this;
var def;
if (this.options.on_save) {
- if (this.form_view.checkInvalidFields()) {
+ if (this.form_view.canBeSaved()) {
return $.Deferred().reject();
}
def = this.options.on_save(this.form_view.model.get(this.form_view.handle));