Skip to Content
Menú
This question has been flagged
1 Respondre
5080 Vistes

Hay,

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,
    }
custom_material()

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

Avatar
Descartar
Autor Best Answer

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

Avatar
Descartar

Hi. How can you do this?

Related Posts Respostes Vistes Activitat
3
de jul. 18
3270
2
de maig 15
31449
0
de gen. 22
2077
2
de jul. 16
7510
1
de jul. 15
3385