diff options
| author | Lucas Lefèvre <lul@odoo.com> | 2019-09-09 12:40:07 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-09-10 11:46:01 +0000 |
| commit | 55a4910b2ea196223fff9f8b5d3f90cf21c23cd5 (patch) | |
| tree | 2978086f3160ce99719e6da03c5d5303d6c7289d /addons/website_forum | |
| parent | c55c3e7388be8b132078aa0209149faf90c98ae4 (diff) | |
[FIX] hr: Redirect to company employee profile
Only one employee per company and per user is allowed.
Based on the company the user is logged in, "My profile"
should redirect to the employee profile of the current
company.
If the user has no employee in the current company,
"My Profile" redirects to the simple "Preferences" screen.
Currently, it always redirects to the employee in the user's
main company (`user.company_id`)
This issue is a consequence of a5b6f31 which uses the context
to know the current company instead of `user.company_id`.
Specification
=============
Un-store the employee_id field on the res.users model.
To achieve this, we need to implement a _search method for this field.
That way, each time we try to access to the employee_id value, the
returned employee depends on the context.
Diffstat (limited to 'addons/website_forum')
0 files changed, 0 insertions, 0 deletions
