Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How do I migrate data to new version of schema when I update my custom addons?

on 12/16/14, 7:20 PM 666 views

I am writing custom addons for my company. Over their life these
addons will accumulate data in the tables I have modelled, using the

During development, when I want to update the schema I have to
uninstall and reinstall the addon. It will drop all the tables and
recreate them.

The question is, when I am deploying a new version of an addon to
product (because it has new features which need new table columns,
etc), how do I safely preserve and migrate the production data to the
new schema without losing it?



I can't comment on Baiju's answer because it requires 50 karma. Anyway Baiju, thanks. I take your answer to mean that Odoo will automatically add new tables to the database based on any new fields added when I upgrade a module. I will make sure to back it up just to be safe, but this was the answer I was looking for.



| 5 4 8
Kochi, India
ODOO technical and functional

        I like learning new thing, especially technical thing. I am a quick learner, I can learn technical things very fast. I have good logical skill,  I have immense interest in programming.

e-mail id : baijuks@hotmail.com

On 12/16/14, 11:52 PM

Hi, Darrel

If you want to add a new field to an object, you can do that without losting data, only thing you have to take care is don't uninstall the module. If you you uninstall the module all your data in that object will be lost.

To add an extra field to an object you can simply modify your .py file and .xml file in your module and save that then;-

1. Restart your odoo server

2. Upgrage your module (Settings==> select module==> click upgrade

Now you can see the changes you made without losting data.


Med Said BARA

--Med Said BARA--
| 5 5 7
--Med Said BARA--
Med Said BARA
On 12/17/14, 3:13 AM

The first thing you have to do, is to backup your database (just is case .. !), and after that, install or uninstall your new module as usual.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 12/16/14, 7:20 PM
Seen: 666 times
Last updated: 3/16/15, 8:10 AM