Thursday, March 27, 2025
1 change · master
Enhancements to existing features
Short time formatting now follows Odoo’s own language settings instead of relying on external defaults. This keeps displayed times consistent across apps and improves handling of AM/PM translations in some languages.
Original PR description
Description of the issue/feature this PR addresses: - Usage of short_time_format effectively which is already defined in base. - Test cases updated accordingly. Current behavior before PR: - While using format_time method, time_format='short' used babel's time format. - These time formats do not match with Odoo base (res.lang.csv) ex: locale='en_US' in babel is 12 hr format while res.lang.csv defines it as '%H:%M:%S'. Desired behavior after PR is merged: - time_format='short' while now access the short_time_format defined in base ( res.lang.csv). - 'short' will allow to only remove seconds from the time format, and not changing the whole format itself. - AM/PM language translations in few languages (ex. zh_CN) are better handled in base, unlike babel.