Skip to Content
Menu
This question has been flagged
2380 Rodiniai

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)

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
geg. 25
4159
1
lapkr. 22
1787
1
lapkr. 22
1956
0
gruod. 20
58
1
geg. 20
7160