diff options
| author | Christophe Matthieu <chm@openerp.com> | 2012-11-27 14:56:21 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2012-11-27 14:56:21 +0100 |
| commit | ebf4ae991a5c8fd207f73eebdc14dc2476454d31 (patch) | |
| tree | 5d918df70d6a66cfac9408f062fbcf68f3baa8dd /addons/web/static/src/js | |
| parent | ef5be74caaad979360436c6674c09d3adf400898 (diff) | |
| parent | 77ac04efd8a3fba90e745192cb2288d5a89b3300 (diff) | |
[MERGE] form trunk-bug-1059320-psa for FIX bug/1059320. Improved code for the displaying the db_list, if more than one db in list display name instead of debug
bzr revid: chm@openerp.com-20121127135621-kmnb4o2kv21bsmwz
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index e355f08bb7c..1bca6bf94cd 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -989,6 +989,14 @@ instance.web.UserMenu = instance.web.Widget.extend({ if(res.company_id[0] > 1) topbar_name = _.str.sprintf("%s (%s)", topbar_name, res.company_id[1]); self.$el.find('.oe_topbar_name').text(topbar_name); + if(!instance.session.debug) { + self.rpc("/web/database/get_list", {}).done( function(result) { + if (result.length > 1) { + topbar_name = _.str.sprintf("%s (%s)", topbar_name, instance.session.db); + } + self.$el.find('.oe_topbar_name').text(topbar_name); + }); + } var avatar_src = self.session.url('/web/binary/image', {model:'res.users', field: 'image_small', id: self.session.uid}); $avatar.attr('src', avatar_src); }); |
