Saturday, July 26, 2025
2 changes · 17.0
Enhancements to existing features
Odoo now better aligns database time with simulated application time during specialized test runs. This helps teams test date- and time-sensitive behavior more accurately without affecting production use.
Original PR description
[IMP] sql_db: replace now to reflect the time offset When using the faketime lib to test Odoo, only the Odoo processes are affected, so it does not reproduce the reality. With this commit, when an environment variable `ODOO_FAKETIME_MODE` is set, the cursor `now` function is altered the same way faketime alters the Odoo processes. See https://github.com/wolfcw/libfaketime Forward-Port-Of: odoo/odoo#219671
Resolved issues and error corrections
This change makes an internal tax report test run in a way that better prepares website assets and avoids timing-related failures. It helps keep automated checks stable, reducing false alarms for developers without changing customer-facing features.
Original PR description
This test could fail locally when assets are not up to date, or when using faketime. This is mostly because assets are not pregenerated if no http case is run. It can also fail randomly because http requests are not serialized. Forward-Port-Of: odoo/enterprise#90520