From 8a5f5e11996b7416b8b2dd6744760574c6580b09 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 15 Feb 2012 11:56:28 +0100 Subject: [PATCH] [IMP] Restore form dirty confirmation on pager change bzr revid: fme@openerp.com-20120215105628-i91krjqgbx28n1h2 --- addons/web/static/src/js/view_form.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 9bd566bf2a7..366dfadb4d3 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -469,8 +469,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# return def.promise(); }, can_be_discarded: function() { - return true; // FIXME: Disabled until the page view and button refactoring is done - return !this.is_dirty() || confirm(_t("Warning, the record has been modified, your changes will be discarded.")); + return !this.$element.is('.oe_form_dirty') || confirm(_t("Warning, the record has been modified, your changes will be discarded.")); }, /** * Triggers saving the form's record. Chooses between creating a new