Thursday, March 21, 2019
4 changes · master
Enhancements to existing features
This update makes Odoo's web test tools use the same simulated date across more date-related functions. It improves test reliability by preventing mismatches between fake test dates and real current dates.
Original PR description
Before this commit, when we use `testUtils.patchDate`, the function `Date.now` was not using the fake date for reference. This is an issue with the lib momentjs, which instantiate the current date as follow: ``` new Date(Date.now()) ``` Because of this, we were handling patched date and unpatched moment objects. Task-ID 1902848
Resolved issues and error corrections
This fix adjusts how the web client opens the home menu during automated checks so it waits for the menu to be ready. It helps prevent false test failures caused by timing issues in the enterprise home menu, improving reliability without changing normal user workflows.
Original PR description
Since odoo/enterprise@b830ea7ed2a the enterprise home menu is asynchronous. Because of that, the clientActionCount variable is updated too late and this counter is screwed up, making the test fail. With this commit a setTimeout 0 is used to click on home menu in the next tick and then update the current action count. Also * the test is adapted to stop immediately when an error is catched. * the initial click on home menu is moved into debug manager because the python test launcher user the correct location already. Thanks to @VincentSchippefilt and @aab-odoo
Code cleanup and technical improvements
Payroll tests were updated to use clearer date and time setup methods instead of harder-to-read parsing code. This is an internal cleanup that makes the test suite easier to maintain without changing payroll behavior for users.
Original PR description
Using `strptime` to parse time is not very readable. This commit clean payroll test by using ORM methods or default datetime constructor instead of `strptime`. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update improves the title shown when no content is available, making the guidance clearer for users setting up or viewing website-related areas. The change helps reduce confusion in empty screens without altering business workflows.
Original PR description
*: base Revision on https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417 - suggested by @sswapnesh (https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417#commitcomment-32825219) - implemented by @alexkuhn