Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
5691 Tampilan

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
Buang
Penulis Jawaban Terbai

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

Avatar
Buang

Hi. How can you do this?

Post Terkait Replies Tampilan Aktivitas
3
Jul 18
4017
2
Mei 15
32613
0
Jan 22
2825
2
Jul 16
8150
1
Jul 15
3914