Monday, March 3, 2025
2 changes · saas-18.2
Resolved issues and error corrections
The restaurant floor plan now hides unnecessary trailing zeros in table change amounts. This makes displayed amounts easier to read for staff without changing the underlying values or workflow.
Original PR description
- Hide trailing zeros of table changes on floorplan. previous realted PR: https://github.com/odoo/odoo/pull/198188/files --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents occasional false test failures in the gamification module caused by tiny timestamp precision differences. It helps keep automated validation stable without changing user-facing functionality.
Original PR description
Before this commit, the test `test_20_update_all_goals_filter` would fail occasionally due to the users supposed to have recent activity being considered inactive. This happens because the method `_update_all`, in charge of updating goals for active users, would compare the goal `write_date` stored with full timestamp precision including microseconds with the users `last_presence` which is effectively stored at second-level precision. When the two values are close, the microsecond difference can cause `write_date` to appear greater than `last_presence`, preventing goal updates. This commit fixes the issue by artificially adding one second to the `last_presence` of the users in order to guarantee it to be greater then `write_date` and thus preventing test failures due to microsecond mismatches. backport of https://github.com/odoo/odoo/pull/197987