diff options
| author | Yannick Tivisse <yti@odoo.com> | 2020-12-10 10:23:08 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-12-10 10:23:08 +0000 |
| commit | 09a404149d8c15c82d1268bde9c4a725c6babe32 (patch) | |
| tree | 9c2baa350bb34e42e4c943e477db375ef38754c0 /addons/hr_holidays | |
| parent | 7473ad44f960aa3609faafe0cee8e12a392b43a9 (diff) | |
[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#63135
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_holidays')
| -rw-r--r-- | addons/hr_holidays/models/hr_leave.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_holidays/models/hr_leave.py b/addons/hr_holidays/models/hr_leave.py index 9d23004fe8b..1dd65d17bbc 100644 --- a/addons/hr_holidays/models/hr_leave.py +++ b/addons/hr_holidays/models/hr_leave.py @@ -1090,7 +1090,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: |
