跳至內容
選單
此問題已被標幟
2 回覆
2908 瀏覽次數

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 !!!!

頭像
捨棄
作者 最佳答案

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 

頭像
捨棄
最佳答案

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
1月 17
2853
0
9月 23
41
4
3月 23
16725
2
7月 22
3610
0
5月 22
1912