From 59bfef4c27c96e9f8b2e3af6361a92798916d77f Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Wed, 6 Jun 2018 23:01:59 +0530 Subject: [PATCH] [Fix] hr_holidays: do not copy parent_id When creating an allocation by employee tag if you copied any allocation made, it was still linked to the parent allocation, hence when confirming/refusing the parent allocation it would confirm/refuse the copied one too. Closes: #25106 --- addons/hr_holidays/models/hr_holidays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/models/hr_holidays.py b/addons/hr_holidays/models/hr_holidays.py index 4059d21e080..6efae7eb519 100644 --- a/addons/hr_holidays/models/hr_holidays.py +++ b/addons/hr_holidays/models/hr_holidays.py @@ -195,7 +195,7 @@ class Holidays(models.Model): states={'draft': [('readonly', False)], 'confirm': [('readonly', False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. " "\nChoose 'Allocation Request' if you want to increase the number of leaves available for someone") - parent_id = fields.Many2one('hr.holidays', string='Parent') + parent_id = fields.Many2one('hr.holidays', string='Parent', copy=False) linked_request_ids = fields.One2many('hr.holidays', 'parent_id', string='Linked Requests') department_id = fields.Many2one('hr.department', string='Department', readonly=True) category_id = fields.Many2one('hr.employee.category', string='Employee Tag', readonly=True,