[REV] Revision 3408 revid:al@openerp.com-20121114005029-41tkuo2g93vbnz60 does not pass runbot tests
bzr revid: fme@openerp.com-20121114090731-hrw2eh6b1and8soc
This commit is contained in:
parent
9d8a2ea8e9
commit
9114457d71
|
@ -1001,6 +1001,10 @@ class Session(openerpweb.Controller):
|
|||
class Menu(openerpweb.Controller):
|
||||
_cp_path = "/web/menu"
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
def load(self, req):
|
||||
return {'data': self.do_load(req)}
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
def get_user_roots(self, req):
|
||||
return self.do_get_user_roots(req)
|
||||
|
@ -1027,8 +1031,7 @@ class Menu(openerpweb.Controller):
|
|||
|
||||
return Menus.search(menu_domain, 0, False, False, context)
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
def load(self, req, menu_id=None):
|
||||
def do_load(self, req):
|
||||
""" Loads all menu items (all applications and their sub-menus).
|
||||
|
||||
:param req: A request object, with an OpenERP session attribute
|
||||
|
@ -1044,11 +1047,7 @@ class Menu(openerpweb.Controller):
|
|||
|
||||
# menus are loaded fully unlike a regular tree view, cause there are a
|
||||
# limited number of items (752 when all 6.1 addons are installed)
|
||||
if menu_id:
|
||||
# for load only one sub menu
|
||||
menu_ids = Menus.search([['id', 'child_of', menu_id]], 0, False, False, context)
|
||||
else:
|
||||
menu_ids = Menus.search([], 0, False, False, context)
|
||||
menu_ids = Menus.search([], 0, False, False, context)
|
||||
menu_items = Menus.read(menu_ids, ['name', 'sequence', 'parent_id', 'action', 'needaction_enabled', 'needaction_counter'], context)
|
||||
# adds roots at the end of the sequence, so that they will overwrite
|
||||
# equivalent menu items from full menu read when put into id:item
|
||||
|
|
|
@ -716,8 +716,7 @@ instance.web.Menu = instance.web.Widget.extend({
|
|||
},
|
||||
menu_loaded: function(data) {
|
||||
var self = this;
|
||||
// TODO remove data.data
|
||||
this.data = {"data": data};
|
||||
this.data = data;
|
||||
this.renderElement();
|
||||
this.limit_entries();
|
||||
// Hide toplevel item if there is only one
|
||||
|
|
Loading…
Reference in New Issue