Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2377 Visninger

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)

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
maj 25
4159
1
nov. 22
1783
1
nov. 22
1955
0
dec. 20
58
1
maj 20
7160