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 22, 2024
1 parent 6a87e65 commit fbfa58e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,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
Expand Down

0 comments on commit fbfa58e

Please sign in to comment.