Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
3013 Weergaven

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
Annuleer
Auteur Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jan. 17
2955
0
sep. 23
41
4
mrt. 23
16862
2
jul. 22
3750
0
mei 22
2043