forked from Techsystech/web
[MIG] Loading shortcuts
parent
b9deeaa653
commit
79639d95cb
|
@ -37,8 +37,8 @@ class WebShortcut(models.Model):
|
||||||
]
|
]
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def get_user_shortcuts(self, user_id):
|
def get_user_shortcuts(self):
|
||||||
shortcuts = self.search([('user_id', '=', user_id)])
|
shortcuts = self.search([('user_id', '=', self.env.user.id)])
|
||||||
res = []
|
res = []
|
||||||
for shortcut in shortcuts.filtered('menu_id'):
|
for shortcut in shortcuts.filtered('menu_id'):
|
||||||
_name = shortcut.menu_id.name_get()
|
_name = shortcut.menu_id.name_get()
|
||||||
|
|
|
@ -18,10 +18,20 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</t>
|
</t>
|
||||||
|
<!--
|
||||||
<t t-extend="ViewManagerAction">
|
<t t-extend="ViewManagerAction">
|
||||||
<t t-jquery="h2.oe_view_title" t-operation="prepend">
|
<t t-jquery="h2.oe_view_title" t-operation="prepend">
|
||||||
<a t-if="widget.flags.display_title !== false" class="oe_shortcut_toggle" title="Add / Remove Shortcut..."
|
<a t-if="widget.flags.display_title !== false" class="oe_shortcut_toggle" title="Add / Remove Shortcut..."
|
||||||
href="javascript: void(0)"> </a>
|
href="javascript: void(0)"> </a>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
-->
|
||||||
|
<t t-extend="ControlPanel">
|
||||||
|
<t t-jquery="ol.oe-view-title" t-operation="prepend">
|
||||||
|
<a t-if="widget.flags.display_title !== false" class="oe_shortcut_toggle" title="Add / Remove Shortcut..."
|
||||||
|
href="javascript: void(0)"> </a>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
|
||||||
|
|
||||||
</templates>
|
</templates>
|
||||||
|
|
Loading…
Reference in New Issue