Paramjit Singh Sahota(OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-bug-1059320-psa into lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
  Bug #1059320 in OpenERP Web: "[trunk] display dbname if len(db_list())>1 
[chs]"
  https://bugs.launchpad.net/openerp-web/+bug/1059320

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-1059320-psa/+merge/136410

Hello Sir,

Improved code for the displaying the db_list "if more than one db in list 
display name instead of debug [chs]".

Thankz You,
 -PSA
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-1059320-psa/+merge/136410
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-bug-1059320-psa.
=== modified file 'addons/web/static/src/js/chrome.js'
--- addons/web/static/src/js/chrome.js	2012-11-26 10:05:01 +0000
+++ addons/web/static/src/js/chrome.js	2012-11-27 13:29:35 +0000
@@ -989,6 +989,14 @@
                 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);
             });

_______________________________________________
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

Reply via email to