我使用下面的代码来更改标题,但不适用于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"});
},
});
};
最后,我得到了odoo/addons/web/static/src/webclient/webclient.js第37行:您可以更改">Odoo">到您所需的标题
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");
}
});