-
- Downloads
[REF] base: remove field source of ir.translation
Instead, make sure the field src is always up to date Add tests Changes in _write: - Replace _set_ids (to be deprecated) call by _upsert_translations as it works in batch - Call _upsert_translations for any language, including en_US In case an English translation already existed for a record, only the master value (on the reference record) was updated but the user kept seeing the translation value (was revealed 73a7534b). - Read src_trans without language Similar as above, if an English translation already existed, the translation was used for the result of the read and not the new value that has just been inserted into the database - Add _set_source method When updating a master record of a translated field, the src field must be updated, including in different languages. Before it was ok that the src field was out of date as the source was computed Changes in copy_translation: - set src as the new value without lang update the comment to reflect reality since 489494e7 src will contain the English version if no changes were made and it will contain the modified value if copy was overriden Changes in upsert_translations: - Do not force a module, comment, state Only src, res_id, name, value and lang must be given. Optional values will no longer be set to null if not given
Showing
- addons/transifex/models/ir_translation.py 2 additions, 2 deletionsaddons/transifex/models/ir_translation.py
- addons/website_gengo/controllers/main.py 1 addition, 1 deletionaddons/website_gengo/controllers/main.py
- odoo/addons/base/models/ir_translation.py 22 additions, 52 deletionsodoo/addons/base/models/ir_translation.py
- odoo/addons/base/tests/test_translate.py 65 additions, 0 deletionsodoo/addons/base/tests/test_translate.py
- odoo/addons/base/views/ir_translation_views.xml 4 additions, 4 deletionsodoo/addons/base/views/ir_translation_views.xml
- odoo/models.py 18 additions, 5 deletionsodoo/models.py
Loading
Please register or sign in to comment