-
- Downloads
[FIX] hr_holidays: handle tz attribute error if user timezone empty
When a user tries to create a leave request without linking an employee with the user and without a configured login user timezone, a traceback will be generated. Steps to reproduce: - Install the "hr_holidays" module. - Create a new user, e.g., "Test user", and login with another browser. - Login as an admin user and go to Settings > Users & Companies. - Search for "Test user" and set Timzone as empty. - Go to the Time Off menu and create a leave request; after that, a traceback will be generated. Error: AttributeError: 'bool' object has no attribute 'upper' When a user tries to create a leave request without linking an employee with the user and without a configured login user timezone, the _get_start_or_end_from_attendance() function of the "hr.leave" object will call at that time timzone not getting. Code reference: https://github.com/odoo/odoo/blob/15.0/addons/hr_holidays/models/hr_leave.py#L111 Sentry-4441512696 closes odoo/odoo#134208 X-original-commit: 2b0f9e39 Signed-off-by:Sofie Gvaladze (sgv) <sgv@odoo.com>
Loading
Please register or sign in to comment