Odoo Help


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.


which is better to use osv.osv or orm.model?? what is the difference of this two?

on 8/15/14, 11:03 PM 2,792 views

I'm using version 7 openerp, which is better to use for this version osv.osv or orm.model?? any suggestion please..

OSV is depricated in V8.0 (though still works but may be completely removed in 9.0). You can use model.Models instead.

on 12/24/14, 5:09 AM

Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 8/16/14, 2:48 AM

osv is a class and an OpenERP descriptor class and all the class( model) must inherit it for OpenERP module deployment.

osv class inside in OSV module in OpenERP server , which content all the OpenERP properties like you can see _column, _defaults and other many things there such as nameetc so we must inherit in our openerp model (class)

In version 7, 

The ORM, short for Object-Relational Mapping, is a central part of OpenERP.

In OpenERP, the data model is described and manipulated through Python classes and objects. It is the ORM job to bridge the gap -- as transparently as possible for the developer -- between Python and the underlying relational database (PostgreSQL), which will provide the persistence we need for our objects.

osv.osv is deprecated and it still works for backward compatibility. You should use orm.Model instead.

In version 8+, 


The model defnition is

orm.Model ---> models.Model

orm.TransientModel ---> models.TransientModel

thanks Dhinesh

on 8/20/14, 2:27 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

3 follower(s)


Asked: 8/15/14, 11:03 PM
Seen: 2792 times
Last updated: 4/26/15, 11:18 AM