From 17e7697c5612d5b9c5f4e89eff04116e1e8bb7d8 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Mon, 22 Jul 2024 21:40:05 +0200 Subject: [PATCH] [FIX-OU] base: in order to load translation, we should check if the value is empty --- openupgrade_scripts/scripts/base/16.0.1.3/pre-migration.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openupgrade_scripts/scripts/base/16.0.1.3/pre-migration.py b/openupgrade_scripts/scripts/base/16.0.1.3/pre-migration.py index e87c95550458..7919180e9129 100644 --- a/openupgrade_scripts/scripts/base/16.0.1.3/pre-migration.py +++ b/openupgrade_scripts/scripts/base/16.0.1.3/pre-migration.py @@ -95,7 +95,11 @@ def update_translatable_fields(cr): bool_or(imd.noupdate) AS noupdate FROM ir_translation it LEFT JOIN ir_model_data imd ON imd.model = %(model)s AND imd.res_id = it.res_id - WHERE it.type = 'model' AND it.name = %(name)s AND it.state = 'translated' + WHERE it.type = 'model' + AND it.name = %(name)s + AND it.state = 'translated' + AND it.value IS NOT NULL + AND length(it.value) > 0 GROUP BY it.res_id ) UPDATE {table} m