diff --git a/web_menu_navbar_needaction/__openerp__.py b/web_menu_navbar_needaction/__openerp__.py index e1356e9c..4f54faf9 100644 --- a/web_menu_navbar_needaction/__openerp__.py +++ b/web_menu_navbar_needaction/__openerp__.py @@ -26,6 +26,7 @@ "summary": "Show the sum of submenus' needaction counters in main menu", "depends": [ 'web', + 'mail', ], "data": [ "data/ir_config_parameter.xml", diff --git a/web_menu_navbar_needaction/static/src/js/web_menu_navbar_needaction.js b/web_menu_navbar_needaction/static/src/js/web_menu_navbar_needaction.js index 93a859ad..799b6120 100644 --- a/web_menu_navbar_needaction/static/src/js/web_menu_navbar_needaction.js +++ b/web_menu_navbar_needaction/static/src/js/web_menu_navbar_needaction.js @@ -75,4 +75,15 @@ openerp.web_menu_navbar_needaction = function(instance) }); }, }) + + instance.mail.Thread.include({ + message_fetch_set_read: function (message_list) + { + this._super.apply(this, arguments); + return this.render_mutex.exec(function() + { + instance.client.menu.refresh_navbar_needaction(); + }); + }, + }) }