[12.0] update_translations with overwrite=True doesn't work
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.
The calls seems to be:
ir.module.module._update_translationsir.translation.load_module_termstools.translate.trans_loadCould you check the context in each step?
EDIT: The issue is maybe in the fourth call:
tools.translate.trans_load_data: thecontextparameter is not propagated toir.translationmethod 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)