[MIG] Loading shortcuts

This commit is contained in:
tarteo
2017-02-13 16:56:34 +01:00
parent b9deeaa653
commit 79639d95cb
2 changed files with 12 additions and 2 deletions

View File

@@ -37,8 +37,8 @@ class WebShortcut(models.Model):
]
@api.model
def get_user_shortcuts(self, user_id):
shortcuts = self.search([('user_id', '=', user_id)])
def get_user_shortcuts(self):
shortcuts = self.search([('user_id', '=', self.env.user.id)])
res = []
for shortcut in shortcuts.filtered('menu_id'):
_name = shortcut.menu_id.name_get()