コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
4116 ビュー

working fine in Odoo15 and Odoo16 . but not working in Odoo17
-----------------------------js------------------------------
/ @odoo-module /


import { WebClient } from "@web/webclient/webclient";

import { patch } from "web.utils";


patch(WebClient.prototype, "bdtask_customize_header_title_logo.WebClient", {

    setup() {

        this._super();

        this.title.setParts({ zopenerp: "Bdtask" });

    },

});
-------------------------manifest---------------------------------
'assets': { 'web.assets_backend_prod_only': [ 'bdtask_customize_header_title_logo/static/src/js/favicon.js', ], },

アバター
破棄
最善の回答
Hope this help:

/** @odoo-module **/

import { registry } from "@web/core/registry";
import { WebClient } from "@web/webclient/webclient"
import {patch} from "@web/core/utils/patch";
import { useService } from "@web/core/utils/hooks";

// Changes Odoo to My Title in window title
patch(WebClient.prototype, {
setup() {
super.setup();
const titleService = useService("title");
titleService.setParts({ zopenerp: "My Title" });
},
});
アバター
破棄

Is this for v17?

Yes @Arnaud Vanspauwen. The following post, with the same answer, has a comment with one way to implement it:

https://www.odoo.com/es_ES/forum/ayuda-1/window-title-odoo17-240409

関連投稿 返信 ビュー 活動
1
8月 24
2996
2
4月 24
5171
0
1月 24
40
0
10月 24
2350
3
2月 25
1592