تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
3714 أدوات العرض

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


}

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مارس 15
3428
1
أبريل 20
2807
1
مايو 16
98
3
ديسمبر 15
4128
0
أكتوبر 15
4142