[FIX] Error while deleting a record when there is only one record in pageview

bzr revid: ado@openerp.com-20120607064431-2r2gbh0hav11ojeg
This commit is contained in:
Amit Dodiya 2012-06-07 12:14:31 +05:30
commit 7c38280c50
1 changed files with 1 additions and 0 deletions

View File

@ -364,6 +364,7 @@ session.web.ViewManager = session.web.OldWidget.extend(/** @lends session.web.V
* @returns {$.Deferred} switching end signal
*/
on_prev_view: function (options) {
var options = options || {};
var current_view = this.views_history.pop();
var previous_view = this.views_history[this.views_history.length - 1] || options['default'];
if (options.created && current_view === 'form' && previous_view === 'list') {