Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-bug-16531-msh into
lp:openobject-client-web/6.0.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-bug-16531-msh/+merge/70288
Hello,
Fixed the issue of ir.ui.menu.tree view which came wrong when one migrates the
database.
It is possible that the id of ir.ui.menu.tree may get changed.
So, Instead of specifying the static ID 1 for it, we should better search for
the right candidate for the View.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-bug-16531-msh/+merge/70288
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-bug-16531-msh.
=== modified file 'addons/openerp/controllers/root.py'
--- addons/openerp/controllers/root.py 2011-07-12 11:20:57 +0000
+++ addons/openerp/controllers/root.py 2011-08-03 11:51:37 +0000
@@ -129,7 +129,9 @@
id = ids[0]
ids = menus.search([('parent_id', '=', id)], 0, 0, 0, ctx)
tools = menus.read(ids, ['name', 'action'], ctx)
- view = cache.fields_view_get('ir.ui.menu', 1, 'tree', {})
+ #searching id for the hierarchycal tree view of ir.ui.menu
+ view_id = rpc.RPCProxy('ir.ui.view').search([('model','=','ir.ui.menu'),('type','=','tree')],0,0,'id')[0]
+ view = cache.fields_view_get('ir.ui.menu', view_id, 'tree', {})
fields = cache.fields_get(view['model'], False, ctx)
for tool in tools:
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp