Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3719 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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


}

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
mar 15
3430
1
kwi 20
2808
1
maj 16
98
3
gru 15
4133
0
paź 15
4143