Files
odoo_source/odoo
Chong Wang (cwg) 26b9b656c6 [FIX] core: allow write translation for non-existing record
before this commit:
    record = env['model.name'].browse(id)
if record doesn't exist in the database and call
   record.translated_field_name = value
Then _get_stored_translation will raise
   TypeError: 'NoneType' object is not subscriptable

after this commit:
like write non-translated field, the value can be written to the cache, but not
the database and no error will be raised.
Note: The feature is only for the original ORM 'write', if the 'overriden write'
reads other fields of the non-existing record, a MissingError will be raised.

closes odoo/odoo#119202

X-original-commit: 3ba7ca28a68acccb8eb25f117900c1aa1980264a
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
2023-04-20 15:22:01 +02:00
..
…
2023-03-14 15:52:10 +01:00
2022-10-19 15:12:44 +02:00
2023-03-14 15:52:10 +01:00