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

bzr revid: ado@openerp.com-20120607063146-h22emjasnj0ararc
This commit is contained in:
Amit Dodiya 2012-06-07 12:01:46 +05:30
commit 7c87017fc2
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) {
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') {