New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] hr: fix traceback when click on employee avatar #163305
[FIX] hr: fix traceback when click on employee avatar #163305
Conversation
0ca4ddf
to
d43a9a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your fix! :)
LGTM aside from the comment.
addons/hr/static/src/components/avatar_card/avatar_card_popover_patch.js
Outdated
Show resolved
Hide resolved
This traceback is occurring when the user tries to click on employee avatar in the employee form view. To reproduce this issue:- 1) Install "Employees" 2) open any employee record 3) click on the avatar of manager or coach 4) A traceback occurs Error:- "ValueError: Invalid field 'employee_ids' on model 'hr.employee'" When the user clicks on the employee avatar in the Employee module a traceback is occurring after [1]. Because the "employee_ids" field is not present in "hr.employee". which leads to the above traceback when the read method[2] triggers with the model as "hr.employee" and fields including "employee_ids" [1] odoo@fdc0693 [2] https://github.com/odoo/odoo/blob/503e9cbf16762cfd753c4427e13228c135db21d5/addons/resource_mail/static/src/components/avatar_card_resource/avatar_card_resource_popover.js#L32-L33 This commit will resolve this issue based on the model in props to concat "employee_id" or "employee_ids" in the fields. sentry-3954475523
d43a9a9
to
069492d
Compare
Hello @Bertrand2 Thanks for reviewing the PR! The requested changes are Done. Please check Thank You 🙂 |
robodoo r+ |
This traceback is occurring when the user tries to click on employee avatar in the employee form view. To reproduce this issue:- 1) Install "Employees" 2) open any employee record 3) click on the avatar of manager or coach 4) A traceback occurs Error:- "ValueError: Invalid field 'employee_ids' on model 'hr.employee'" When the user clicks on the employee avatar in the Employee module a traceback is occurring after [1]. Because the "employee_ids" field is not present in "hr.employee". which leads to the above traceback when the read method[2] triggers with the model as "hr.employee" and fields including "employee_ids" [1] fdc0693 [2] https://github.com/odoo/odoo/blob/503e9cbf16762cfd753c4427e13228c135db21d5/addons/resource_mail/static/src/components/avatar_card_resource/avatar_card_resource_popover.js#L32-L33 This commit will resolve this issue based on the model in props to concat "employee_id" or "employee_ids" in the fields. sentry-3954475523 closes #163305 Related: odoo/enterprise#61444 Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
This traceback occurs when the user clicks on the employee avatar in the employee form view.
To reproduce this issue:-
Employees
avatar
ofmanager
orcoach
Error:-
When the user clicks on the
employee avatar
in theEmployee
module a traceback occurs after[1]
.Because the
employee_ids
field is not present inhr.employee
.which leads to the above traceback when the
read
method[2]
triggerswith the model as
hr.employee
and fields includingemployee_ids
[1]
fdc0693
[2]
odoo/addons/resource_mail/static/src/components/avatar_card_resource/avatar_card_resource_popover.js
Lines 32 to 33 in 503e9cb
This commit will resolve this issue based on the model in
props
to concat
employee_id
oremployee_ids
in the fields.Related Enterprise PR:- https://github.com/odoo/enterprise/pull/61444
sentry-3954475523