[FIX] board: filter available dashboards
authorChristophe Simonis <chs@openerp.com>
Wed, 30 Oct 2013 19:55:08 +0000 (20:55 +0100)
committerChristophe Simonis <chs@openerp.com>
Wed, 30 Oct 2013 19:55:08 +0000 (20:55 +0100)
lp bug: https://launchpad.net/bugs/1157896 fixed

bzr revid: chs@openerp.com-20131030195508-gw4prkz230m8toma

addons/board/board.py

index ba5da0d..fafb0ea 100644 (file)
@@ -3,7 +3,7 @@
 #
 #    OpenERP, Open Source Management Solution
 #    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#    Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
+#    Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>).
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -49,6 +49,7 @@ class board_board(osv.osv):
             ('value', 'in', refs),
         ], context=context)
         menu_ids = map(itemgetter('res_id'), IrValues.read(cr, uid, irv_ids, ['res_id'], context=context))
+        menu_ids = Menus._filter_visible_menus(cr, uid, menu_ids, context=context)
         menu_names = Menus.name_get(cr, uid, menu_ids, context=context)
         return [dict(id=m[0], name=m[1]) for m in menu_names]