diff options
| author | Paramjit Singh Sahota <psa@tinyerp.com> | 2012-11-27 14:06:30 +0530 |
|---|---|---|
| committer | Paramjit Singh Sahota <psa@tinyerp.com> | 2012-11-27 14:06:30 +0530 |
| commit | 77ac04efd8a3fba90e745192cb2288d5a89b3300 (patch) | |
| tree | 757ebed4f6d41be36363c629ffa437b258d3cc8e /addons/web/static/src/js | |
| parent | 718b26d796ef8bf793184ff52502af61c3c7a812 (diff) | |
[FIX][trunk] display dbname if len(db_list())>1 [chs]
lp bug: https://launchpad.net/bugs/1059320 fixed
bzr revid: psa@tinyerp.com-20121127083630-odwky5bdy24gxoa4
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); }); |
