diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-03-05 08:06:34 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-03-05 08:06:34 +0100 |
| commit | e178185b4fc600f8a612f3ef6027ebb85acef516 (patch) | |
| tree | 890d3a34c09b47f8237783c3a178f54242dfa5fd /addons/web/controllers | |
| parent | a86051c04659d97bac7ad7773c3df4779d68bcb7 (diff) | |
| parent | 6468fc876a237da4550aa4a9b483f3eaaeba2ab8 (diff) | |
[MERGE] bug fixes form 6.1 branch
bzr revid: xmo@openerp.com-20120305070634-li0eloj7vhsljguu
Diffstat (limited to 'addons/web/controllers')
| -rw-r--r-- | addons/web/controllers/main.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 8e3dbfd344c..7846db3a5dd 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -814,11 +814,13 @@ class Menu(openerpweb.Controller): Menus = s.model('ir.ui.menu') # If a menu action is defined use its domain to get the root menu items user_menu_id = s.model('res.users').read([s._uid], ['menu_id'], context)[0]['menu_id'] + + menu_domain = [('parent_id', '=', False)] if user_menu_id: - menu_domain = s.model('ir.actions.act_window').read([user_menu_id[0]], ['domain'], context)[0]['domain'] - menu_domain = ast.literal_eval(menu_domain) - else: - menu_domain = [('parent_id', '=', False)] + domain_string = s.model('ir.actions.act_window').read([user_menu_id[0]], ['domain'], context)[0]['domain'] + if domain_string: + menu_domain = ast.literal_eval(domain_string) + return Menus.search(menu_domain, 0, False, False, context) def do_load(self, req): |
