[REV] hr_holidays: Revert change on hr_leave's default_get state update
Ever since 14.0, from PR #45414, there has been a _compute_state function for recalculating the state on holiday_status_id change The reverted commit becomes unnecessary and causes incorrect action buttons to be shown before creation Note: Reverts commit 015f8ecfa863ae2fcca983b6bb21e38577b220e7 from #82552 closes odoo/odoo#152513 X-original-commit: 0c4a174d6a3c2615f4851cf3f39ca5159c40acfb Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
This commit is contained in:
committed by
sofiagvaladze
parent
0ff125b957
commit
0ec30b7453
@@ -89,7 +89,7 @@ class HolidaysRequest(models.Model):
|
||||
defaults['request_unit_custom'] = False
|
||||
|
||||
if 'state' in fields_list and not defaults.get('state'):
|
||||
defaults['state'] = 'confirm'
|
||||
defaults['state'] = 'confirm' if lt and lt.leave_validation_type != 'no_validation' else 'draft'
|
||||
|
||||
if 'request_date_from' in fields_list and 'request_date_from' not in defaults:
|
||||
defaults['request_date_from'] = fields.Date.today()
|
||||
|
||||
Reference in New Issue
Block a user