Odoo Help

6

2
1 Answer
3
Avatar

Nicolas Bessi

--Nicolas Bessi--

1630
| 5 7 10
Lausanne, Switzerland
--Nicolas Bessi--
Nicolas Bessi
26.03.13, 04:26

Hello,

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.

4 Comments
patrick
26.03.13, 07:39

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)
26.03.13, 09:11

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

Camptocamp SA
26.03.13, 09:16

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)
26.03.13, 09:22

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

Ask a Question
Tags
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now