Sunday, August 24, 2025
1 change · saas-18.3
Resolved issues and error corrections
This fix prevents translated field values from being overwritten or lost when users work with unsaved records in multiple languages. It improves reliability for multilingual data entry, especially for product names and similar translated content.
Original PR description
Steps to reproduce the issue:
1. Install a second language (eg, ar_001) and `product`
2. Start odoo shell
3. Run the following:
`(env := env(context=dict(env.context,lang='ar_001')))['product.template'].new({'name':'test'}).with_context(lang='en_US').name`
Current behavior before PR:
The `get` method of the cache will not find a value for the `en_US` language and set the value stored in the env language to a default (`None` in this case) after raising `CacheMiss`
Desired behavior after PR is merged:
We can read and write translatable fields in different languages on transient records without data loss.
opw-4943458
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#223997
Forward-Port-Of: odoo/odoo#222474