Odoo Help

Nicolas Bessi
On 3/26/13, 4:26 AM


osv and osv_memory are just aliases to Model and TransientModel. They are still here for backward compatibility and will be supress with next release.

# deprecated - for backward compatibility.
osv = Model
osv_memory = TransientModel
osv_abstract = AbstractModel # ;-)

in osv code.

So in my scripts I should use Model.osv when defining a new model? class my_object(osv.osv):

should be:

class my_object(Model.osv):

on 3/26/13, 7:39 AM

Yes @patrick. You should use osv.Model instead of osv.osv and osv.TransientModel instead of osv.osv_memory.

Sudhir Arya (ERP Harbor Consulting Services)
on 3/26/13, 9:11 AM

In fact the recommended solution is from openerp.osv import orm, fields,... then do class X(orm.Model): class Y(orm.TransientModel):

Camptocamp SA
on 3/26/13, 9:16 AM

Yes. Instead of from osv or from toole, etc, we should use from openerp.osv or from openerp.tools, etc.

Sudhir Arya (ERP Harbor Consulting Services)
on 3/26/13, 9:22 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 3/26/13, 4:14 AM
Seen: 4807 times
Last updated: 9/30/17, 6:21 AM