From 71d17ace284297a343b9cf158a4d33dc9eac8706 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 10 Apr 2012 10:33:21 +0200 Subject: [PATCH] [FIX] `this` is hard, let's go shopping bzr revid: xmo@openerp.com-20120410083321-ahi5blkr25mdlgjx --- addons/web/static/src/js/view_form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 1544ce6718a..62eb659d0a2 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -647,8 +647,8 @@ openerp.web.FormView = openerp.web.View.extend({ reload: function() { var self = this; return this.reload_mutex.exec(function() { - if (this.dataset.index == null) { - this.do_prev_view(); + if (self.dataset.index == null) { + self.do_prev_view(); return $.Deferred().reject().promise(); } if (self.dataset.index == null || self.dataset.index < 0) {