Obtaining an empty recordset for a different model

When writing Odoo code, the methods of the current model are available through self. If you need to work on a different model, it is not possible to directly instantiate the class of that model; you need to get a recordset for that model to start working.

This recipe shows you how to get an empty recordset for any model that's registered in Odoo inside a model method.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset