Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5510 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

Hi. How can you do this?

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 7 18
3782
2
thg 5 15
32247
0
thg 1 22
2650
2
thg 7 16
7976
1
thg 7 15
3745