[IMP] Restore form dirty confirmation on pager change

bzr revid: fme@openerp.com-20120215105628-i91krjqgbx28n1h2
This commit is contained in:
Fabien Meghazi 2012-02-15 11:56:28 +01:00
parent e10bb64419
commit 8a5f5e1199
1 changed files with 1 additions and 2 deletions

View File

@ -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