Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] update_module_moved_models: minor fix in a query #291

Merged
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
4 changes: 2 additions & 2 deletions openupgradelib/openupgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2690,9 +2690,9 @@ def update_module_moved_models(cr, model, old_module, new_module):
logged_query(
cr,
"UPDATE ir_model_data SET module=%s "
"WHERE name=model_%s AND model = 'ir.model' AND module = %s "
"WHERE name='model_' || '%s' AND model = 'ir.model' AND module = %s "
"RETURNING res_id",
(new_module, table, old_module),
(new_module, AsIs(table), old_module),
)
model_id = cr.fetchone()
if model_id:
Expand Down