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

Hai,

I will declare two class, these two class have two field also,. I will select value(one class member field in drope down list) from field in the first class memebr, the it can be set to another class memebr field. How it possible

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

hi.you can set it by using related field.

Try this example:

class first_table(osv.osv):
    _name = "first.table"
    _columns = {
       'field1' : fields.many2one('res.partner','Field1'),

        'field2' : fields.integer('Field2'),

}

class second_table(osv.osv):
    _name = "second.table"
    _inherit = "first.table"
    _columns = {
       'field3' : fields.many2one('first.table','Field3'),

        'field4' : fields.related('field3','field1', type='many2one', string='Field4',store=True),


}

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 15
3475
1
thg 4 20
2821
1
thg 5 16
98
3
thg 12 15
4151
0
thg 10 15
4163