This question has been flagged
2 Replies
9838 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?

Avatar
Discard
Author Best Answer

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.

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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?

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 :)