Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2288 Представления

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)

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мая 25
3991
1
нояб. 22
1676
1
нояб. 22
1870
0
дек. 20
58
1
мая 20
7027