From 2ded82920e5b4b014ddf1f5edfb3cee6b5c88b8b Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 7 Jan 2021 17:13:08 +0000 Subject: [PATCH] [FIX] website: repair "overwrite" mode for translation wizard In the context of bug #43365, the fix merged in #48031 introduced an override of `ir.translation._load_module_terms()`, which calls `super()` then does some extra stuff. This was forward-ported to later versions, unfortunately the forward-ports missed the fact that the method signature changed at some point (circa saas-13.2) and the `overwrite` flag which used to be passed in the `context` had become an explicit method argument. As a result, that argument is lost in the `super()` call and the `website` module entirely disables the "overwrite" mode for the translation loading wizard. The fwd-port that seems to introduce the issue is odoo/odoo#50477 (998987f8ee148235f4025eb97a424e838ac6fc9f) closes odoo/odoo#64251 X-original-commit: 26355a6bf83a194c2e398e859e49920da1f415b8 Signed-off-by: Olivier Dony (odo) --- addons/website/models/ir_translation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/models/ir_translation.py b/addons/website/models/ir_translation.py index b253443cc1c..bb99cb0c4c3 100644 --- a/addons/website/models/ir_translation.py +++ b/addons/website/models/ir_translation.py @@ -8,7 +8,7 @@ class IrTranslation(models.Model): def _load_module_terms(self, modules, langs, overwrite=False): """ Add missing website specific translation """ - res = super()._load_module_terms(modules, langs) + res = super()._load_module_terms(modules, langs, overwrite=overwrite) if not langs or not modules: return res