[FIX] calendar: create an appraisal directly by editing it
Steps to reproduce:
- get into an employee appraisal;
- click on the smart button "No meeting" from calendar view;
- edit it directly the meeting and save.
Issue:
We will not find any new meeting on the smart button if we go back to the employee appraisal page.
Cause:
When saving the appraisal from the edit view, an event will be created. Unfortunately, the `res_id` field (which allows it to be linked to a record in the `hr_appraisal` table) is not correct. The smart button that is attached to the `hr_appraisal` model will not detect that there is an event.
Solution:
Don't accept a `res_id` which is zero. If so, take the default `res_id` and update it in the dictionnary that will be used to create the event.
opw-3042573
closes odoo/odoo#104627
Related: odoo/enterprise#33510
Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
Loading
Please register or sign in to comment