[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
This commit is contained in:
Xavier Morel 2012-04-03 16:17:26 +02:00
parent e9f4fc98cc
commit da864266c0
1 changed files with 4 additions and 3 deletions

View File

@ -749,8 +749,9 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
} }
}, },
no_result: function () { no_result: function () {
var help = this.options.action.help; if (this.groups.group_by
if (this.groups.group_by || !help) { || !this.options.action
|| !this.options.action.help) {
return; return;
} }
this.$element.children('table').replaceWith( this.$element.children('table').replaceWith(
@ -758,7 +759,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
.append($('<img>', { .append($('<img>', {
src: '/web/static/src/img/empty-list-arrow.png', src: '/web/static/src/img/empty-list-arrow.png',
alt: _t("This list is empty")})) alt: _t("This list is empty")}))
.append($('<div>').html(help))); .append($('<div>').html(this.options.action.help)));
} }
}); });
openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.ListView.List# */{ openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.ListView.List# */{