Open yankinmax opened 3 years ago
The calls seems to be:
ir.module.module._update_translations
ir.translation.load_module_terms
tools.translate.trans_load
Could you check the context in each step?EDIT: The issue is maybe in the fourth call:
tools.translate.trans_load_data
: the context
parameter is not propagated toir.translation
method calls it seems...BTW for V14 this change broke our implementation here
https://github.com/odoo/odoo/commit/ac63556e239ab03c42384477385f003c7477287b
The overwrite context key has been replace by an argument.
It is present on module's _update_translation()
method:
https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/models/ir_module.py#L908
Thus for v14 we will want to call:
Module._update_translation(overwrite=overwrite)
Here https://github.com/camptocamp/anthem/blob/e067afb678c1c036e90949c5e39b9df104b45661/anthem/lyrics/modules.py#L23-L44 we specify overwrite=True, so existing translation should be overwritten. While debugging here (where it's supposed to be upserted) https://github.com/odoo/odoo/blob/5d40023eaf9b3c25941429e7fac266722780846d/odoo/addons/base/models/ir_translation.py#L137 always have self._overwrite=False.