[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
This commit is contained in:
committed by
RomainLibert
parent
a7d9d966a5
commit
59bfef4c27
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user