Home > database >  How to change the page title for odoo 15?
How to change the page title for odoo 15?

Time:09-26

I was using this code below to change the title but not working for odoo 15.

openerp.your_module_name = function(instance) {
instance.web.WebClient.include({
    init: function(parent, client_options) {
        this._super(parent, client_options);
        this.set('title_part', {"zopenerp": "Your Title"});
    },
});
};

CodePudding user response:

finally, I Got the on odoo/addons/web/static/src/webclient/webclient.js line 37: you can change "Odoo" to your required title

this.title.setParts({ zopenerp: "Odoo" }); // zopenerp is easy to grep
            useBus(this.env.bus, "ROUTE_CHANGE", this.loadRouterState);
            useBus(this.env.bus, "ACTION_MANAGER:UI-UPDATED", (mode) => {
                if (mode !== "new") {
                    this.el.classList.toggle("o_fullscreen", mode === "fullscreen");
                }
            });
  • Related