Skip to content
Snippets Groups Projects
Commit 93b95317 authored by mafo-odoo's avatar mafo-odoo
Browse files

[FIX] hr: same view when opeing employee from messaging


Steps to reproduce:
- set demo to receive notifs in Odoo
- go to employees
- click "launch plan" for demo user
- login as demo user
- Click on the link for the activity that is sent in discuss

Issue:
There is no chatter in the view

Explanation:
the view of en employee coming from messaging is always
hr.employee.public that does not contain the chatter.

opw-2990577

closes odoo/odoo#102803

X-original-commit: 918ea972c74e563bf8ef3db13f3a1b9c610bca37
Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
Signed-off-by: default avatarFockedey Martin (mafo) <mafo@odoo.com>
parent 20920ae9
Branches
Tags
No related merge requests found
......@@ -141,10 +141,10 @@ registerModel({
/**
* Opens the most appropriate view that is a profile for this employee.
*/
async openProfile() {
async openProfile(model = 'hr.employee.public') {
return this.messaging.openDocument({
id: this.id,
model: 'hr.employee.public',
model: model,
});
},
},
......
......@@ -25,7 +25,7 @@ registerPatch({
async openProfile({ id, model }) {
if (model === 'hr.employee' || model === 'hr.employee.public') {
const employee = this.messaging.models['Employee'].insert({ id });
return employee.openProfile();
return employee.openProfile(model);
}
return this._super(...arguments);
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment