Odoo Help

0

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

By
Jeff Beidler
on 1/27/15, 4:38 PM 1,551 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?

1
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.

0

Hello,

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

JKE

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.

Register

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)

Stats

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