Closed chienandalu closed 2 months ago
There's a limitation here as the core method executes a query inside the method that expects the table ir_translation
to be renamed as _ir_translation
... so we we should do it in base
pre-migration
to be able to use it: https://github.com/OCA/OCB/blob/1e74b85c260fc0c6d15e7e4e13d9afcb9c2e9909/odoo/tools/translate.py#L1616-L1631
I recommend then that this method renames the table before, and restores it after.
Now that I see the diff, why previous approach replacing inside the query didn't serve?
See the code I linked in my previous comment. There's a query execution inside the method that we can't change
OK, understood
@marielejeune FYI
We're making use of core's
_get_translation_upgrade_queries
which aside from provide the proper queries to upgrade the translated fields to the new json structure tries to cleanup the former ir_tanslation records.In OpenUpgrade we try to keep historic info after migration so we're able to quickly react to possible inconsistencies.
cc @Tecnativa TT49615