Odoo Help

1 Answer

Nicolas Bessi

--Nicolas Bessi--

| 5 7 8
Lausanne, Switzerland
--Nicolas Bessi--
Nicolas Bessi
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.

3/26/13, 7:39 AM

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):

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

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

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

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

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

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

Ask a Question
About This Community

This platform 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.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now