Odoo Help

Welcome!

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.

0

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

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

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--
2993
| 3 2 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

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

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)

Stats

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