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

Use openupgrade lib and warn old use #345

Merged
merged 2 commits into from
Sep 21, 2015

Conversation

bwrsandman
Copy link

5.0 version

Reopen of #317 on my own branch

We ported the openupgrade scripts to pypi

pypi Package

The recommendation for using those scripts is now: from openupgradelib import openupgrade

This patch should properly raise a warning be reverse compatible as long as openupgradelib is intalled in the python path.

The reasoning behind moving this bit of code to a lib is for module migrations within the same Odoo version but with changes in a module such as a field rename.

Prior to this, the recommended way was to copy code into migrations if not use OpenUpgrade. This makes the code reusable and gets rid of code duplication.

@bwrsandman bwrsandman added this to the 5.0 milestone Aug 11, 2015
@bwrsandman bwrsandman force-pushed the 5.0_openupgradelib branch 2 times, most recently from c0b0e4a to 69c64bb Compare August 14, 2015 02:00
@bwrsandman bwrsandman force-pushed the 5.0_openupgradelib branch 3 times, most recently from 5d429ab to a68f4d6 Compare August 14, 2015 20:10
@pedrobaeza
Copy link
Member

I haven't tested this version yet in a real migration, but it seems to be correct.

@StefanRijnhart
Copy link
Member

👍

StefanRijnhart added a commit that referenced this pull request Sep 21, 2015
Use openupgrade lib and warn old use
@StefanRijnhart StefanRijnhart merged commit 0ba340e into OCA:5.0 Sep 21, 2015
@bwrsandman bwrsandman deleted the 5.0_openupgradelib branch September 23, 2015 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants