跳至内容
菜单
此问题已终结
2407 查看

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)

形象
丢弃
相关帖文 回复 查看 活动
1
5月 25
4168
1
11月 22
1802
1
11月 22
1981
0
12月 20
58
1
5月 20
7193