diff options
| author | Fabien Meghazi <fme@openerp.com> | 2012-02-15 11:56:28 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2012-02-15 11:56:28 +0100 |
| commit | 8a5f5e11996b7416b8b2dd6744760574c6580b09 (patch) | |
| tree | 6b812a18105d0f0a416300a5b410638fe7d9857c /addons/web/static/src/js/view_form.js | |
| parent | e10bb6441985bf3a91dafd577584b2fb7cd6cd43 (diff) | |
[IMP] Restore form dirty confirmation on pager change
bzr revid: fme@openerp.com-20120215105628-i91krjqgbx28n1h2
Diffstat (limited to 'addons/web/static/src/js/view_form.js')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 3 |
1 files changed, 1 insertions, 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 |
