[FIX] hr: bring back "My Profile"

Since the merge of 0573aca the override was no longer working.

closes odoo/odoo#77097

Taskid: 2651838
X-original-commit: 947194644a09f186899f2b2526cf0b0675af7304
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Kevin Baptiste
2021-09-24 05:50:48 +00:00
parent af666dff20
commit 2012a9d205
3 changed files with 18 additions and 5 deletions
+1
View File
@@ -59,6 +59,7 @@
'hr/static/src/js/language.js',
'hr/static/src/js/m2x_avatar_employee.js',
'hr/static/src/js/standalone_m2o_avatar_employee.js',
'hr/static/src/js/user_menu.js',
'hr/static/src/models/*/*.js',
],
'web.qunit_suite_tests': [
+16
View File
@@ -0,0 +1,16 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { preferencesItem } from "@web/webclient/user_menu/user_menu_items";
export function hrPreferencesItem(env) {
return Object.assign(
{},
preferencesItem(env),
{
description: env._t('My Profile'),
}
);
}
registry.category("user_menuitems").add('profile', hrPreferencesItem, { force: true })
+1 -5
View File
@@ -1,8 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<template xml:space="preserve">
<t t-extend="UserMenu.Actions">
<t t-jquery="a[data-menu='settings']" t-operation='inner'>
My Profile
</t>
</t>
<!-- TODO remove in master -->
</template>