Skip to content

Commit 3e7bf59

Browse files
authored
Merge pull request #389 from hbrunn/master-m2o_to_x2m-docs-rename_columns
[UPD] m2o_to_x2m: docstring recommends outdated usage
2 parents 8b0c22b + 4ea054a commit 3e7bf59

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openupgradelib/openupgrade.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,8 +1867,9 @@ def get_model2table(model):
18671867
def m2o_to_x2m(cr, model, table, field, source_field):
18681868
"""
18691869
Transform many2one relations into one2many or many2many.
1870-
Use rename_columns in your pre-migrate script to retain the column's old
1871-
value, then call m2o_to_x2m in your post-migrate script.
1870+
For openupgrade < 14.0, use rename_columns in your pre-migrate script
1871+
to retain the column's old value, then call m2o_to_x2m in your
1872+
post-migrate script.
18721873
18731874
WARNING: If converting to one2many, there can be data loss, because only
18741875
one inverse record can be mapped in a one2many, but you can have multiple

0 commit comments

Comments
 (0)