From da864266c0c374abecad3295f74a57b0d7a394b8 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 3 Apr 2012 16:17:26 +0200 Subject: [PATCH] [FIX] o2m/m2m lists: only display help when there's help on the action... or an action at all bzr revid: xmo@openerp.com-20120403141726-a6o4sfvifzzjy9r4 --- addons/web/static/src/js/view_list.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index c9a65ac6c4b..85943732c68 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -749,8 +749,9 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# } }, no_result: function () { - var help = this.options.action.help; - if (this.groups.group_by || !help) { + if (this.groups.group_by + || !this.options.action + || !this.options.action.help) { return; } this.$element.children('table').replaceWith( @@ -758,7 +759,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# .append($('', { src: '/web/static/src/img/empty-list-arrow.png', alt: _t("This list is empty")})) - .append($('
').html(help))); + .append($('
').html(this.options.action.help))); } }); openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.ListView.List# */{