Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
5098 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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

Avatar
Abbandona

Hi. How can you do this?

Post correlati Risposte Visualizzazioni Attività
3
lug 18
3279
2
mag 15
31513
0
gen 22
2110
2
lug 16
7527
1
lug 15
3396