Monday, March 10, 2025
5 changes · saas-17.4
Resolved issues and error corrections
This fixes a point of sale test issue caused by comparing dates and times in a way that no longer works reliably in newer Python versions. The change helps keep the point of sale system compatible with upcoming platform updates without affecting day-to-day user workflows.
Original PR description
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568
The Website edit button now only appears for users with at least restricted editor rights. This prevents users without website editing access from seeing an action they should not use and improves permission consistency in the website toolbar.
Original PR description
When the "can publish" right was forward ported to 17.4, the whole website systray became visible for non-website users. The condition was moved to individual items like the "+New" button and the mobile preview button. However it was not added on the "Edit" button. This commit fixes this by requiring the user to be at least a restricted editor to display the "Edit" button. The negative test failed to catch this because for a short period of time, the systray is displayed without the "Edit" button. [1]: https://github.com/odoo/odoo/commit/dc3f497dcf8701881016791b78368773ba66f5d2 task-3175890
This fix keeps website location simulation working after a change in the third-party GeoIP library. It helps prevent checkout-related automated tests from failing when newer GeoIP versions are used, without changing normal customer-facing behavior.
Original PR description
maxmind decided to remove support for `raw_response` and chhange the API of Country/City to take all the raw_response components by keywords instead (maxmind/GeoIP2-python@4518919151e1b39bd544df653b41cd155dc2f708). This leads to location mocking not working anymore, which leads to the failure of `:TestWebsiteSaleCart.test_cart_new_fpos_from_geoip` when using geoip2 5.0. When mocking the request with a country code set, just try the new API then fallback on the old one (note: the commit also removes the `locales` default fallback, so make that explicit).
Reordering items in the map view no longer removes the displayed routes. Routes are kept and recalculated so users can continue seeing the correct path after changing the order.
Original PR description
Before this commit, the map view removed the routes after reordering the items. Now, the routes are kept and the path recalculated. task-4493063
This fix makes an automated Web Studio test more stable by removing unpredictable behavior that caused occasional false failures. It helps keep development validation reliable without changing how users experience the product.