Skip to content

Commit

Permalink
[OU-FIX] base: in order to load translation, we should check if the v…
Browse files Browse the repository at this point in the history
…alue is empty
  • Loading branch information
etobella committed Jul 24, 2024
1 parent 6a87e65 commit 2e56132
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openupgrade_scripts/scripts/base/16.0.1.3/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ 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 COALESCE(it.value, '') != ''
GROUP BY it.res_id
)
UPDATE {table} m
Expand Down

0 comments on commit 2e56132

Please sign in to comment.