Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5104 มุมมอง

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 ?)

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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?

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ค. 18
3287
2
พ.ค. 15
31522
0
ม.ค. 22
2117
2
ก.ค. 16
7534
1
ก.ค. 15
3401