[FIX] Fixed weird bug with search and count=True.

bzr revid: tde@openerp.com-20120405130401-1nebka17459h71cj
This commit is contained in:
Thibault Delavallée 2012-04-05 15:04:01 +02:00
parent 2740f7e474
commit 920c7b4af4
1 changed files with 2 additions and 1 deletions

View File

@ -263,10 +263,11 @@ class ir_ui_menu(osv.osv):
res[menu.id] = {}
if menu.action and menu.action.type == 'ir.actions.act_window' and menu.action.res_model:
menu_needaction_res = self.pool.get(menu.action.res_model).get_needaction_info(cr, uid, uid, domain=menu.action.domain, context=context)
if not isinstance(menu_needaction_res[1], (int, long)): menu_needaction_res[1] = 0
else:
menu_needaction_res = [False, 0, ()]
res[menu.id]['needaction_enabled'] = menu_needaction_res[0]
res[menu.id]['needaction_counter'] = int(menu_needaction_res[1])
res[menu.id]['needaction_counter'] = menu_needaction_res[1]
res[menu.id]['needaction_record_ids'] = []
return res