İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4349 Görünümler

Hi i'm totally new in python, hope i will get help from experience person. Is possible to get data one model to another in a model using foreign key.... I tried this way but can getting result ....


    class A(models.Model):

        _inherit = 'project.task'

        field_a = fields.Char(string='field_a')

        field_b = fields.Char('field_b')

    class B(models.Model):

        # _inherit = 'project.task'

        field_a = fields.Char(string='field_a class B')

        field_b2 = fields.Char(string='field_b2')

    class C(models.Model):

        # _inherit = 'project.task'

        field_a = fields.Char('field_a class C')

        field_c = fields.Char('field_c')

Avatar
Vazgeç
En İyi Yanıt

hello Anchal,

You need to use many2one relation field, or many2many:

https://www.odoo.com/documentation/8.0/howtos/backend.html#relations-between-models

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Nis 24
1791
4
Kas 23
5838
0
Eki 23
1630
0
Ara 22
2510
2
Ara 23
19192