-
- Downloads
[FIX] core: fix cached translations
before this commit: translations updated by `update_field_translation` api cannot be detected by t-cache and some cached data whose model overrides `write` with an extra 'clear_caches()' Step to reproduce: - Create a mega menu, select any template, `Odoo Menu` for the example - Install another language on the website - Go to the translated version of your website and enter translate mode - Change "Camera" in the mega menu to something else - Save The change won't be replicated, looking like it did nothing. From there, removing or adding `edit_translations=1` in the URL will use different cache version of the page's views and you will see the outdated value on one and the correct on the other one. after this commit: `update_field_translation` will call `write` it does the following 4 important things 1. mark field as modified 2. execute logics in the override `write` method 3. update write_date if needed to support t-cache opw-3305117 Part-of: odoo/odoo#124402
Showing
- addons/website/tests/test_menu.py 35 additions, 0 deletionsaddons/website/tests/test_menu.py
- odoo/addons/base/models/ir_model.py 2 additions, 7 deletionsodoo/addons/base/models/ir_model.py
- odoo/addons/base/models/ir_ui_view.py 1 addition, 4 deletionsodoo/addons/base/models/ir_ui_view.py
- odoo/addons/test_new_api/models/test_new_api.py 14 additions, 0 deletionsodoo/addons/test_new_api/models/test_new_api.py
- odoo/addons/test_new_api/tests/test_related_translation.py 16 additions, 0 deletionsodoo/addons/test_new_api/tests/test_related_translation.py
- odoo/models.py 11 additions, 5 deletionsodoo/models.py
- odoo/tools/translate.py 1 addition, 0 deletionsodoo/tools/translate.py
Loading
Please register or sign in to comment