Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions openupgrade_scripts/scripts/base/16.0.1.3/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ def login_or_registration_required_at_checkout(cr):


def update_translatable_fields(cr):
# Fix terms with wrong to_translate state. DBs with long version history could have
# terms that didn't have the right state and those would be ignored
openupgrade.logged_query(
cr,
"""
UPDATE ir_translation set state = 'translated'
WHERE type = 'model'
AND state = 'to_translate'
AND value is NOT NULL
AND value IS DISTINCT FROM src
""",
)
# exclude fields from translation update
exclusions = {
# ir.actions.* inherits the name and help columns from ir.actions.actions
Expand Down
Loading