Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
3046 Tampilan

Hi guys , 

If I have field FA in class CA in  module MA , and field FB in class CB in module MB, 

i want that the value of FA (entry)  display in field FB


Any suggestions PPPLLLZZZ !!!!

Avatar
Buang
Penulis Jawaban Terbai

Hi, thak you for your answer , it tried related field before and its didn't worked , and it now that I noticed that i didn't had FB field in xml, it was in comment ( just in python) hhhhhhhh, and now its work . 


Thank you again 

Avatar
Buang
Jawaban Terbai

use Environment for that like this,

module MA->class CA

class ClassA(models.Model):

    _name = 'modulea.classa'

    fielda = fields.Char('Name', required=True,)


module MB->class CB

class ClassB(models.Model):

    _name = 'moduleb.classb'

    fieldb = fields.Char('Name', required=True,)

   

    def get_recordes(self):

        for record in self.env['modulea.classa']:

            print record.fielda


I hope this works.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jan 17
2965
0
Sep 23
41
4
Mar 23
16897
2
Jul 22
3775
0
Mei 22
2063