[FIX] hr_holidays: remove timeoff warning when unecessary
Step to reproduce: - As mitchell admin - Change user's/employee tz to something != UTC - Go to time off - Click on the calendar Current behaviour: - Wizard Popup with a timezone warning - If the same thing is done with the 'New Time Off' button, the warning is not present Behaviour after PR: - No Warning - `request_unit_custom` should be False if `holiday_status_id` is set which might happen in default_values. opw-2828936 closes odoo/odoo#90357 X-original-commit: 5565eb9f3dc4259f1304373eff83f7d54a0db7be Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -83,6 +83,7 @@ class HolidaysRequest(models.Model):
|
||||
|
||||
if lt:
|
||||
defaults['holiday_status_id'] = lt.id
|
||||
defaults['request_unit_custom'] = False
|
||||
|
||||
if 'state' in fields_list and not defaults.get('state'):
|
||||
lt = self.env['hr.leave.type'].browse(defaults.get('holiday_status_id'))
|
||||
|
||||
Reference in New Issue
Block a user