Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2389 Lượt xem

In odoo15, how can I add new menu in usermenu.I try the following but not working.

import { registry } from "@web/core/registry";

export function UserLog(env) {
return {
type: "item",
id: "log",
description: env._t("Log"),
callback: async function () {
const actionDescription = await env\.services\.orm\.call\("user\.recent\.log",\ "action_user_activity"\);
\ \ \ \ \ \ \ \ \ \ \ \ env.services.action.doAction(actionDescription);
},
sequence: 70,
};
}

registry.category("user_menuitems").add('profile', UserLog)

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 25
4162
1
thg 11 22
1790
1
thg 11 22
1960
0
thg 12 20
58
1
thg 5 20
7164