Browse Source

follow 80 cols line limit (PEP8) and move myself in last place of contibutor list, also add known issue.

pull/694/head
jlzhou 7 years ago
parent
commit
cbbe7c2e11
  1. 8
      web_shortcut/README.rst
  2. 11
      web_shortcut/models/web_shortcut.py

8
web_shortcut/README.rst

@ -28,6 +28,12 @@ To use this module, you need to:
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/162/10.0
Known Issues
============
Clicking shortcut menu item sometimes doesn't trigger the left side submenu widget
updating except reloading the whole page.
Client side may raise TypeError exception randomly: this.active_view is null.
Bug Tracker
===========
@ -42,11 +48,11 @@ Credits
Contributors
------------
* Henry Zhou (MAXodoo) <zhouhenry@live.com>
* Adrien Peiffer
* Dennis Sluijk <d.sluijk@onestein.nl>
* Odoo SA
* Thomas Binsfeld <thomas.binsfeld@acsone.eu>
* Henry Zhou (MAXodoo) <zhouhenry@live.com>
Maintainer
----------

11
web_shortcut/models/web_shortcut.py

@ -25,13 +25,18 @@ class WebShortcut(models.Model):
res = []
trans = self.env['ir.translation']
for shortcut in shortcuts.filtered('menu_id'):
name_translated = trans._get_source('ir.ui.menu,name', 'model', self.env.user.lang, shortcut.menu_id.name,
name_translated = trans._get_source('ir.ui.menu,name', 'model',
self.env.user.lang,
shortcut.menu_id.name,
shortcut.menu_id.id)
current = shortcut.menu_id
while current.parent_id:
current = current.parent_id
name_translated = ' / '.join((trans._get_source('ir.ui.menu,name', 'model', self.env.user.lang,
current.name, current.id), name_translated))
name_translated = ' / '.join((
trans._get_source('ir.ui.menu,name', 'model',
self.env.user.lang,
current.name, current.id),
name_translated))
_name = shortcut.menu_id.name_get()
_name = _name[0][1] if len(_name) else ''
_id = shortcut.menu_id.id

Loading…
Cancel
Save