[FIX] hr_holidays: Archive meeting on leave refusal

Unlinking it could be problematic if the synchronization is activated
with google or microsoft, as this action is prevented to avoid multiple
synchronization of the same event.

closes odoo/odoo#63157

X-original-commit: 09a404149d8c15c82d1268bde9c4a725c6babe32
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Yannick Tivisse
2020-12-10 12:34:22 +00:00
parent acf99ae77d
commit 3daf67d902
+1 -1
View File
@@ -1093,7 +1093,7 @@ class HolidaysRequest(models.Model):
validated_holidays.write({'state': 'refuse', 'first_approver_id': current_employee.id})
(self - validated_holidays).write({'state': 'refuse', 'second_approver_id': current_employee.id})
# Delete the meeting
self.mapped('meeting_id').unlink()
self.mapped('meeting_id').write({'active': False})
# If a category that created several holidays, cancel all related
linked_requests = self.mapped('linked_request_ids')
if linked_requests: