Skip to content
Snippets Groups Projects
Commit 8e5196ef authored by Thomas Lefebvre (thle)'s avatar Thomas Lefebvre (thle)
Browse files

[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: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent bd11808c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment