Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5682 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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

Avatar
Zrušit

Hi. How can you do this?

Related Posts Odpovědi Zobrazení Aktivita
3
čvc 18
4005
2
kvě 15
32579
0
led 22
2818
2
čvc 16
8144
1
čvc 15
3911