Merge pull request #838 from odoo-dev/master-navbar-imp-response-time-sle

[IMP] cache the load_menus method to improve website performances
This commit is contained in:
sle-odoo 2014-06-30 17:43:38 +02:00
commit 78c2de35c2
1 changed files with 1 additions and 0 deletions

View File

@ -349,6 +349,7 @@ class ir_ui_menu(osv.osv):
menu_domain = [('parent_id', '=', False)]
return self.search(cr, uid, menu_domain, context=context)
@tools.ormcache()
def load_menus(self, cr, uid, context=None):
""" Loads all menu items (all applications and their sub-menus).