Odoo Help


Is it possible to update the database schema when something changes?

Jeff Beidler
on 1/27/15, 4:38 PM 1,821 views

I have seen OpenUpgrade, which seems to be a utility to migrate databases between major versions of Odoo.  Is there any way to update a database schema when something changes between nightly builds?

Here's some background:  see this post, in which I described how creating a new database after updating Odoo allowed me to install my module which overrides the purchase order report body template.  The problem I have now is that we have another database that we need to update, but the Odoo backup/restore mechanism doesn't allow for the database schema to be upgraded.  When you restore the backup, you're still stuck with the database as it was at the time of backup.  Something changed in Odoo, but you can only use the changes if you create a brand new database.  Any hints?

Jeff Beidler
On 1/28/15, 1:32 PM

This is what finally worked for me: (run from the folder containing the new version of Odoo)

./odoo.py --addons='my_addons_dir' -u all -d MyDBName

The key part was adding the database flag/name along with the "-u all".  Simply using "-u all" without the database name didn't do it.  After running the above command, Odoo was able to find the pertinent External ID and the module installed in the pre-existing database without problems.


Jérémy Kersten (jke)

--Jérémy Kersten (jke)--

| 3 3 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 1/27/15, 4:56 PM


V8 is a stable version, so schema is not updated since the release.

It will be the same thing with saas version. Once the freeze done, we don't upgrade the schema.

The only db schema which can change at any time is the master branch.

Sometimes, you can need to update a module to have some fix in view (xml) but never schema SQL or other things which change the API !

Best regards


Hmm... okay, so why would Odoo not know about External ID "purchase.report_purchasequotation_document" when running on Odoo version 8.0_5d58b55, but after updating to version 201501115, everything works?

Jeff Beidler
on 1/27/15, 5:48 PM

Strange, This new key has been added in commit https://github.com/odoo/odoo/commit/27fa742a700dfada76658661073f4b002032adf5 (end octobre) So while you don't make a update of "purchase" module, this key was not existing and called. And I don't see why and where another code will use this new key. But if everything works now... good luck :)

Jérémy Kersten (jke)
on 1/28/15, 3:52 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/27/15, 4:38 PM
Seen: 1821 times
Last updated: 3/16/15, 8:10 AM