Friday, March 22, 2019
2 changes · master
Resolved issues and error corrections
This fix changes automated web tests to close pop-up windows the same way a user would, by focusing and clicking the close button. This helps prevent cleanup issues with date and time pickers, reducing false test failures and improving reliability.
Original PR description
During the clickEverywhere test, when a modal is opened, the hide method is called to bypass it. This is not realistic and does not work in some cases. For example in Point of sale, menu "Reporting/Sales Details", a modal is opened with a DateTimePicker (tempus dominus) already opened. When hiding or closing the modal, the DateTimePicker needs to perform some cleanup. If the modal is simply hidden, the DateTimePicker is not cleanly destroyed. With this commit, a modal is closed by clicking on its close button and before that, the focus is set on the close button to let the datepicker widget do its stuff on losing focus. Also, a more realistic click is done by triggering more events (code adapted from tour helper).
Payroll benefit creation now handles employee time zones consistently by converting times to UTC before storing them. This helps prevent benefits and related work entries from being created at the wrong time for employees in different locations.
Original PR description
This commit simplifies the way the timezones are handled in hr_benefit. Creating a benefit now uses naive datetimes obtained by converting from the employee's timezone into UTC and then stripping timezone information. closes odoo/odoo#31968 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> X-port/Cherry-pick of odoo/odoo@6878c9f3424f27df9b07a665f9c0f5ef6e254996