This document summarizes the key technical differences between Odoo versions 7 and 10. It describes changes to the API, removal of the pool object, changes to file names and XML tags, removal of string references in XPath expressions, introduction of the env notion, changes to field declaration and default value setting, and changes to JavaScript usage with the introduction of Backbone.js in version 9. Some examples of new API decorators and differences in API parameters are also provided.
2. INTRODUCTION
• This presentation will be helpful for the developers of Odoo
• You all know that odoo version 7 was called openERP
• Now it has changed to odoo
• There are lot of difference between version 7 to version 10
• All developers might have faced many issues at the beginning of their development
career, that no proper documents are maintained for the changes created in the latest
versions according to the previous versions.
3. • Odoo Release In February 2005.
• At That Time It Is Called Tiny ERP.
• Tiny ERP Has 4 Releases. Version 1, 2, 3 And 4.
• In April 2009 Odoo Releases Their 5’Th Version.
• At That Time It Changed its name to OpenERP.
4. • OpenERP Has 4 Versions. Version 5, 6, 6.1, And 7.
• After That OpenERP Changes To Odoo.
• The Version 8 Is Released On September 18, 2014.
• Odoo Latest Series Have 4 Versions-Version 8, 9, 10, And 11.
• Version 11 Is Coming Soon.
• In short, Versions Of Odoo 7 And Odoo 10 have so many differences in the technical
side.
6. 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).
7. • 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.
8. 2) Pool
• The 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.
11. 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.
12. 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').
13. 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.
14. 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 Uses Both Field Declaration Methods.
V10 - Product_id = Fields.Many2one('Product.Product', 'Product')
V10 Uses Only The New Api.
15. 8) Set Default Values To Fields.
V7 - _defaults = {
'Date': Lambda * A: Datetime.Datetime.Now()
}
V8 - _defaults = {
'Date': Lambda * A: Datetime.Datetime.Now()
}
And
16. 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())
17. 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;
}
18. 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;
});
19. • 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 lot of changes from version 7 to version 10.
20. Refer this link for more:
https://www.cybrosys.com/blog/odoo-technical-differences
21. Thank You !
Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park,
Kakkancherry,
Calicut University P.O.
Calicut
Kerala, India - 673635.
Cybrosys Ltd
15, ST Antonys Road,
Forest Gate, London
England,
E79QA.
Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, Kerala,
India-682030.