← Back to team overview

openupgrade-drivers team mailing list archive

Re: New Member

 

On 03/27/2013 01:34 PM, Khaled Sharara wrote:
Hello,

I am a developer working in a small company that is using OpenERP's Sales Module and they need to upgrade their system from version 6.1 to version 7.0 and I am assigned the task of migrating the data belonging to the sales module. I learned about this project OpenUpgrade but I also noticed that there is still no migration scripts to version 7.0. Therefore, I decided to contribute to this project and try to help in developing migration scripts for the sales module. However, I am still very new to OpenUpgrade and need some guidance on how to start. I read the OpenUpgrade documentation but it didn't provide much help. I was wondering if there are any documentation that describe how I can get started in implementing migration scripts (as in methods to call etc.).


Hi Khaled,

thank you for your interest in the project.

With regards to the API docs, they keep falling away due to the fragile virtualenv build system at readthedocs.org. You'll have to read the docstrings from http://bazaar.launchpad.net/~openupgrade-committers/openupgrade-server/7.0/view/head:/openerp/openupgrade/openupgrade.py for now, sorry about that.

The branch with the migration scripts for the 'base' module is a pretty good starting point, but it has not been tested in production. I just merged it, it was a little overdue already.

Main thing for writing the migration scripts is to have an intimate knowledge of how OpenERP works internally, and how to read the OpenUpgrade analysis files.

Gazing through the analysis file for the sale module (http://bazaar.launchpad.net/~openupgrade-committers/openupgrade-addons/7.0/view/head:/sale/migrations/7.0.1.0/openupgrade_analysis.txt) I see for instance that some functionality has been split off to the new sale_stock module. That means that you will have to make sure that the sale_stock module gets installed for migrating databases with 'sale' installed (that even may require a modification in the server code). It also means that some workflow states and transitions have the module part of their xml id changed. Other xml ids have changed name, such as the shop. Diversion of stock.picking to stock.picking.out could be interesting. Of course there is the overall migration of addresses to partners (see the base module migration scripts for how to retrieve the partner for any pre-existing address). Also, sale orders now inherit mail.thread. You will need to create one for every existing order and migrate existing notes on order to messages on the thread.

This is just to give you an indication of what you can expect. Detailed examination of the analysis file, the code and the (noupdate) data will tell you the rest. Of course, that is just the 'sale' module. You'll need to cover the dependencies stock, account etc. as well.

Again, if you know enough about OpenERP internals you should be fine.

Good luck!
Stefan.



Follow ups

References