diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index b1fc438ede0..46f57b37682 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -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. diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index b0a2b7945b9..4b47762fc58 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -220,6 +220,19 @@ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); -box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); } +.openerp2 .oe_secondary_submenu .oe_menu_counter { + float: right; + background: #8a89ba; + color: #eeeeee; + font-size: 12px; + border: 1px solid lightgray; + padding: 0px 4px 0px 4px; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); + margin: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} .openerp2 .oe_secondary_submenu .oe_active { background: #8a89ba; border-top: 1px solid lightGray; @@ -240,6 +253,10 @@ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); } +.openerp2 .oe_secondary_submenu .oe_active .oe_menu_counter { + background: #eeeeee; + color: #8a89ba; +} .openerp2 .oe_secondary_submenu .oe_menu_toggler:before { width: 0; height: 0; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index c31f501c499..ba29a42b197 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -238,6 +238,16 @@ $colour4: #8a89ba text-shadow: 0 1px 1px rgba(0,0,0,0.2) @include radius(4px) @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2)) + .oe_menu_counter + float: right + background: #8a89ba + color: #eee + font-size: 12px + border: 1px solid lightgray + padding: 0px 4px 0px 4px + text-shadow: 0 1px 1px rgba(0,0,0,0.2) + margin: 0px + @include radius(4px) .oe_active background: $colour4 border-top: 1px solid lightGray @@ -251,6 +261,9 @@ $colour4: #8a89ba color: $colour4 text-shadow: 0 1px 1px white @include box-shadow(0 1px 1px rgba(0, 0, 0, 0.2)) + .oe_menu_counter + background: #eee + color: #8a89ba .oe_menu_toggler:before width: 0 height: 0 diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 894f7353c1a..80e097e4a5e 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -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] : ''"> + +
+ +
+