[FIX] correctly remove existing needaction counter on reload

bzr revid: xmo@openerp.com-20130122143842-zv3tpd36glphrutu
This commit is contained in:
Vishmita 2013-01-22 15:38:42 +01:00 committed by Xavier Morel
parent f0e8441130
commit 227758417a
1 changed files with 1 additions and 1 deletions

View File

@ -868,7 +868,7 @@ instance.web.Menu = instance.web.Widget.extend({
this.needaction_data = data;
_.each(this.needaction_data, function (item, menu_id) {
var $item = self.$secondary_menus.find('a[data-menu="' + menu_id + '"]');
$item.remove('oe_menu_counter');
$item.find('.oe_menu_counter').remove();
if (item.needaction_counter && item.needaction_counter > 0) {
$item.append(QWeb.render("Menu.needaction_counter", { widget : item }));
}