Odoo Help


object inheritance : create new object from inherited class

Clément THOMAS
on 8/27/13, 5:30 AM 1,487 views


I do object inheritance with _name != _inherit like in second part of doc

class custom_material(osv.osv):
    _name = 'network.material'
    _inherit = 'network.material'
    _columns = {
        'manuf_warranty': fields.boolean('Manufacturer warranty?'),
    _defaults = {
        'manuf_warranty': lambda *a: False,

Have you a tip to create a custom material from a network material (by copying it ?)

Clément THOMAS
On 8/27/13, 6:04 AM

I've found the solution : You can use result of copy_data method of network material class in create method of custom material

Hi. How can you do this?

Souleymane Male
on 3/17/14, 1:00 PM

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

Question tools

3 follower(s)


Asked: 8/27/13, 5:30 AM
Seen: 1487 times
Last updated: 3/16/15, 8:10 AM