[MERGE] Merge with lp:~openerp-dev/openerp-web/trunk-need_action-tde

bzr revid: sbh@tinyerp.com-20120405100623-l5g1099n8s3idg4s
This commit is contained in:
Sbh (Openerp)
2012-04-05 15:36:23 +05:30
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -875,13 +875,13 @@ class Menu(openerpweb.Controller):
context = req.session.eval_context(req.context)
Menus = req.session.model('ir.ui.menu')
menu_roots = Menus.read(self.do_get_user_roots(req), ['name', 'sequence', 'parent_id', 'action'], context)
menu_roots = Menus.read(self.do_get_user_roots(req), ['name', 'sequence', 'parent_id', 'action', 'needaction_enabled', 'needaction_counter'], context)
menu_root = {'id': False, 'name': 'root', 'parent_id': [-1, ''], 'children' : menu_roots}
# 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)
menu_ids = Menus.search([], 0, False, False, context)
menu_items = Menus.read(menu_ids, ['name', 'sequence', 'parent_id', 'action'], 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
# mapping, resulting in children being correctly set on the roots.
+5
View File
@@ -368,6 +368,11 @@
t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''"
t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''">
<t t-esc="menu.name"/>
<t t-if="menu.needaction_enabled">
<div class="oe_menu_counter">
<t t-esc="menu.needaction_counter"/>
</div>
</t>
</a>
</t>