Skip to content

Commit

Permalink
Merge pull request #4531 from dixmit/16.0-translate
Browse files Browse the repository at this point in the history
[16.0][OU-FIX] base: in order to load translation, we should check if the value is empty
  • Loading branch information
pedrobaeza authored Jul 24, 2024
2 parents cf80291 + 2e56132 commit 8a2b36c
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 8a2b36c

Please sign in to comment.