Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Suggested ways for deploying odoo through docker-odoo-project
Little bounty proposals : Payment plugin and feed export
New library to migrate Odoo module code "odoo-migrate"
by
Groupement Régional Alimentaire de Proximité, Sylvain LE GAL
Dear OCA Contributors,
I am working on a migration from 8.0 to 12.0.
For that purpose, I had to migrate a lot a modules. (about 50 OCA modules, and >100 custom modules)
A lot of changes are very recurrent, and automatable. (removing python2 header, renaming __openerp__.py into __manifest__.py, changing import).
I began to make some scripts, and finally began to create a new python3 library, to make that work. The name is "odoo-migrate" and the description is available here https://pypi.org/project/odoo-migrate/. and can be installed with the command
pip3 install odoo-migrate
Once installed, you can run the following command (other options are available)
odoo-migrate -m my_module_name -i 8.0 -t 12.0
It is based on the OCA recommendations available on this wiki.
In addition to performing recurring operations,
- it displays some warning if some patterns are found. (for example, if "ir.values" is found in a module 11+)
- it calls black for recent version
- it realize commits
1) If you're interested by such tool, you can review or test this project.
2) If you want to contribute, feel free, especially if you love regular expressions. It is still WIP, and there is a lot of work to do, like making change in xml file. (replacing openerp + data by odoo tag). Also adding test and plug with travis could be great.
3) if some OCA members are OK, I can transfer this project under OCA umbrella.
thank you for your feedback.
kind regards.
Follow-Ups
-
Re: New library to migrate Odoo module code "odoo-migrate"
byGroupement Régional Alimentaire de Proximité, Sylvain LE GAL -
Re: New library to migrate Odoo module code "odoo-migrate"
byForgeFlow, S.L., Lois Rilo Antelo -
Re: New library to migrate Odoo module code "odoo-migrate"
byGroupement Régional Alimentaire de Proximité, Sylvain LE GAL -
Re: New library to migrate Odoo module code "odoo-migrate"
byCamptocamp SA, Simone Orsi -
Re: New library to migrate Odoo module code "odoo-migrate"
byAcsone SA/NV, Stéphane Bidoul -
Re: New library to migrate Odoo module code "odoo-migrate"
byAkretion France., David BEAL