How to upgrade odoo 8 to odoo 9 database?

Freddy picture Freddy · Oct 26, 2015 · Viewed 12.1k times · Source

I am trying to upgrade an odoo installation from 8.0 to 9.0. What I've done so far is the following:

  • Backup the odoo database from the production system
  • Installed the backup DB as test in my current system
  • Copied the odoo folder in a folder on my system
  • Checked, if everything works. It works!
  • Updated to the latest v8.0 version, still works
  • Did a git checkout 9.0 followed by a git pull.
  • Started odoo 9.0 with the command ./openerp-server -d testDB -u all

This commands breaks with the following error and does not update my database:

LINE 1: select model, transient from ir_model where state='manual'
                      ^
, in query select model, transient from ir_model where state=%s
 2015-10-26 00:37:29,823 4501 CRITICAL testDB openerp.service.server:
Failed to initialize database `testDB`.
 Traceback (most recent call last):
  File "/opt/odoo/openerp/service/server.py", line 885, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
File "/opt/odoo/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/openerp/modules/loading.py", line 279, in load_modules
loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report)
File "/opt/odoo/openerp/modules/loading.py", line 136, in load_module_graph
registry.setup_models(cr, partial=True)
File "/opt/odoo/openerp/modules/registry.py", line 185, in setup_models
cr.execute('select model, transient from ir_model where state=%s', ('manual',))
File "/opt/odoo/openerp/sql_db.py", line 139, in wrapper
   return f(self, *args, **kwargs)
File "/opt/odoo/openerp/sql_db.py", line 215, in execute
   res = self._obj.execute(query, params)

ProgrammingError: column "transient" does not exist
LINE 1: select model, transient from ir_model where state='manual'

Are there any steps which I have to follow to upgrade the database or has everything to be done by hand? And if yes, what should I do? Obviously it failed because the specific column is non-existent in my database. But is there any update script because I fear, if I change this there will be the next error waiting for me.

Thanks in advance.

Answer

Kiran picture Kiran · Oct 26, 2015

You can ask the odoo company to do that task for you by going to this link .But they will charge money for that. If you can do it yourself here is the documentation on how to do that, https://doc.therp.nl/openupgrade/intro.html

Option 2: We can use pgadmin(postgresql gui tool).Just select your database name and in the top you can see sql enabled,click it and issue an sql query to display all data(you must know the table name which you want to retreive) after that you can export it.The exported file contains all the data with column headings,we may have to rearrange columns according to odoo9 DB.Once it is done select odoo9 database,right click on the table name which you want to import data to and select import option.It may take a while and it should give message as "data imported successfully".