I do change for UserMenu.js script to display Database name in cosole my assets file loaded whiteout error but it have no effect on interface , in the flowing my assets file and custom scrip :
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- create an inherited view of the assets bundle, and add the js file to display Datebase name with For example,-->
<template id="assets_backend" name="database_name assets" inherit_id="web.assets_backend">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/backend_customization_12/static/src/js/chrome/database.js"></script>
</xpath>
</template>
</odoo>
javascript module
odoo.define('backend_customization_12.NewHomeMenu', function (require) {
"use strict";
/**
this Js script to inherit HomeMenu widget to Modifying to dispay database name
*/
var UserMenu = require('web.UserMenu');
var Widget = require('web.Widget');
var NewHomeMenu. = UserMenu.extend({
template: 'NewHomeMenu',
start: function () {
var self = this;
var session = this.getSession();
this.$el.on('click', '[data-menu]', function (ev) {
ev.preventDefault();
var menu = $(this).data('menu');
self['_onMenu' + menu.charAt(0).toUpperCase() + menu.slice(1)]();
});
return this._super.apply(this, arguments).then(function () {
var $avatar = self.$('.oe_topbar_avatar');
if (!session.uid) {
$avatar.attr('src', $avatar.data('default-src'));
return $.when();
}
var topbar_name = session.name;
// if (session.debug) {
// topbar_name = _.str.sprintf("%s (%s)", topbar_name, session.db);
// }
topbar_name = _.str.sprintf("%s (%s)", topbar_name, session.db);
self.$('.oe_topbar_name').text(topbar_name);
var avatar_src = session.url('/web/image', {
model:'res.users',
field: 'image_small',
id: session.uid,
});
$avatar.attr('src', avatar_src);
});
},
var dog = new NewHomeMenu();
return dog.start();
});