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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
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),
}
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
0
mars 15
|
3454 | ||
|
1
avr. 20
|
2814 | ||
|
1
mai 16
|
98 | ||
|
3
déc. 15
|
4139 | ||
|
0
oct. 15
|
4145 |