Antony Lesuisse (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/trunk-social-all-tde into lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-social-all-tde/+merge/100291
wip
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-social-all-tde/+merge/100291
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/trunk-social-all-tde.
=== modified file 'addons/web/controllers/main.py'
--- addons/web/controllers/main.py 2012-03-22 11:31:42 +0000
+++ addons/web/controllers/main.py 2012-03-31 14:53:24 +0000
@@ -875,13 +875,13 @@
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.
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css 2012-03-28 10:04:02 +0000
+++ addons/web/static/src/css/base.css 2012-03-31 14:53:24 +0000
@@ -264,6 +264,17 @@
border-right: 4px solid transparent;
border-top: 4px solid #4c4c4c;
}
+.oe_menu_counter {
+ float:right;
+ background: #eeeeee;
+ color: #8a89ba;
+ font-weight: bold;
+ border-width:1px;
+ padding-top:2px;
+ padding-right:4px;
+ padding-left:4px;
+ border-radius:2px;
+}
.openerp2 .oe_dropdown {
position: relative;
}
=== modified file 'addons/web/static/src/js/chrome.js'
--- addons/web/static/src/js/chrome.js 2012-03-29 11:43:27 +0000
+++ addons/web/static/src/js/chrome.js 2012-03-31 14:53:24 +0000
@@ -846,6 +846,8 @@
// TODO: Show company if multicompany is in use
var topbar_name = _.str.sprintf("%s (%s)", res.name, openerp.connection.db, res.company_id[1]);
self.$element.find('.oe_topbar_name').text(topbar_name);
+ var avatar_src = self.session.prefix + '/web/binary/image?session_id=' + self.session.session_id + '&model=res.users&field=avatar&id=' + self.session.uid;
+ $avatar.attr('src', avatar_src);
return self.shortcut_load();
});
};
=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml 2012-03-28 10:04:02 +0000
+++ addons/web/static/src/xml/base.xml 2012-03-31 14:53:24 +0000
@@ -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>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp