Enable Dark Mode!
odoo-technical-diffrences.png
By: Avinash

Technical transitions from Odoo v7 to Odoo1O

Technical

This blog is exclusively composed of Odoo developers giving an insight into the technical transitions happened between Odoo 7 to Odoo 10. You all know that initial version was known to be Open ERP which finally picked the name Odoo. There are a lot of technical difference between Odoo version 7 and Odoo version 10 if we look in to. As a developer, I faced many hurdles and challenges during the onset of my work as no proper documents detailing the version changes especially the technical difference was made available at that point in time.  


Let me start via giving a brief into on Odoo before going to the technicalities of the software. Odoo made its revolutionary entry in February 2005 with the name Tiny ERP. At the initial stage, Tiny ERP has 4 Releases-Version 1, 2, 3 and 4. Later in April 2009, Odoo released its 5’th version and got the name change with Open ERP from Tiny ERP. Open ERP further came up with 4 different versions- V5, V6, V6.1, and V7.  Finally, soon after the release of version 7, Open ERP was finally titled to the beautiful phenomenal name Odoo, with all new branded theme and logo. The Odoo V8 got released on September 18, 2014. The latest Odoo series is embedded with 4 versions- V8, V9, V10, and V11. The version11 is coming soon with more functionalities and abreast technicalities. 


Here in this blog, I troll you down through the technical transitions happened the versions Odoo 7 and Odoo 10


Main differences:


1) api (Application Programming Interface)


In version 7 we use a different api than we use in Versions 8, 9, 10.

Example for decorators of new api:
@api.returns, @api.multi, @api.one, @api.model, @api.constrains, @api.depends, @api.onchange, @api.noguess.


New api is used in v8, v9, and v10. V7 does not use new api.


In v7(Old Api) we have to pass parameters with the function like database cursor(cr), user id(uid), context dictionary(context), and record ids(ids).


v8 and v9 use both old api and new api.


In v8, v9 and v10(New api) Odoo introduce more object-oriented feel to the functions. We don’t need to put the parameters along with the function. Those parameters are hidden in the model.


v10 uses only new api.

2) pool

A pool is dictionary object that stores the instances of OpenERP model. OpenERP can manage multiple databases. Every database has a different pool. self.pool is referencing the current database instances. pool.get() method is removed in Odoo’s newest version. Version 7, 8 and 9 contain the pool object partially. Odoo 10 completely removes the pool object.


3) manifest file name



v7__openerep__.py
v8 __openerep__.py
v9 __openerep__.py
v10__manifest__.py
4) xml tags



v7<openerp>
v8 <openerp>
v9 <openerp>
v10<odoo>

5) xpath


v7      <xpath expr="//field[@name='amount']" and [@string='amount']
v8      <xpath expr="//field[@name='amount']" and [@string='amount']
v9      <xpath expr="//field[@name='amount']"
v10    <xpath expr="//field[@name='amount']"

Referencing the xpath expression with the string is removed from v9.


6) env


v7 does not use the env notion. It is the notion of new api.


	self.env['model.name'] is used in new api’s instead of self.pool.get('model.name').


7) Field declaration

v7

_columns = {

 

                                    'product_id': fields.many2one('product.product', 'Product'),

                  }

v7 only uses the old api



v8

_columns = {

 

                                    'product_id': fields.many2one('product.product', 'Product'),

                  }

 

                                                                        and 

                        product_id = fields.Many2one('product.product', 'Product')

v8 uses both old api and new api. That is why it can use both field declaration methods.


v9

 _columns = {

 

                                    'product_id': fields.many2one('product.product', 'Product'),

                   }

 

                                                                        and 

                         product_id = fields.Many2one('product.product', 'Product')           

 v9 also uses both old api and new api. So it also use both field declaration methods.


v10product_id = fields.Many2one('product.product', 'Product')

v10 uses only the new api.


8) set default values to fields.


v7

 _defaults = {


'date': lambda * a: datetime.datetime.now()

   }

v8

 _defaults = {


'date': lambda * a: datetime.datetime.now()

   }

and


date = fields.Date(string='Date', default=datetime.now())

v9

_defaults = {


'date': lambda * a: datetime.datetime.now()

  }

and


date = fields.Date(string='Date', default=datetime.now())


v10

date = fields.Date(string='Date', default=datetime.now())

 9) Java script changes.


v7

function openerp_pos_models(instance, module)

                       { 

var _t     =    instance.web._t;


}


v8

function openerp_pos_models(instance, module)

                       { 

var _t     =    instance.web._t;


        }

v9

odoo.define('barcode_integration.interface', function(require)

                       {

‘use strict’;

 

var core =  require(‘web.core’);

var _t     =  core._t;


});

v10

odoo.define('barcode_integration.interface', function(require)

                      {

‘use strict’;

 

var core =  require(‘web.core’);

var _t     =  core._t;


});

in the v7 and v8, we use raw js/ jquery. But in v9 and v10 we use Backbone js.


These are some basic changes made in the versions between 7 and 10. There are a lot of changes happened between version 7 and version 10. If you are interested in this blog, kindly inbox your valuable feedbacks which will motivate me to write in depth more on this topic.  



If you need any assistance in odoo, we are online, please chat with us.



6
Comments

Aysha Siddika

Thank you so much. its so helpful post. i have worked on 8 version and now 10 but didn't work on 9 version. and that's reason it is so difficult to migration odoo 8 to 10. Please provide more.

30/11/2017

-

12:33AM

pawan

nice post. Please provide more info about. Java script changes.

15/08/2017

-

2:07AM

saber

je suis débutant dans odoo , je veux migrer des modules de la version 7 à la version 9 odoo. est ce qu'il ya des idées ?

12/03/2018

-

1:57AM

toni

good article, thanks! I'm also interested in js changes

06/10/2017

-

10:00AM

Shahid Ali

Worthful

06/09/2017

-

6:53AM

Jovani Moura

Nice Explanation! Help me a lot.

04/08/2017

-

9:14AM



Leave a comment



whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message