跳至內容
選單
此問題已被標幟
1 回覆
5145 瀏覽次數

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?

相關帖文 回覆 瀏覽次數 活動
3
7月 18
3419
2
5月 15
31634
0
1月 22
2365
2
7月 16
7627
1
7月 15
3501