Skip to Content
Menu
This question has been flagged
5598 Zobrazenia

Hello ,

i have two models :

model 1 and model 2

in model 1 i have a many2many relation with model 2 like this and other fields:

listrdv = fields.many2many('model2')

----these two fields of my model 1

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

rdvdate = fields.Char(string='rdv date')

i'm displaying my listrdv on my form view with a tree like this :

       

-----these two fields of my model 2 have the same name of those of model 1

           

           

------- getfieldsvalues is my python method name

           

       

now what i want to do is when i click the button , i get the values of that record (one record) and display them or write them in the fields of my model 1 , like explained in this picture .

meaning : when i click that button , i get the values of that record (only one record , the values of employee and rdvdate) and write them in the fields of my form view of my model 1 employee and rdvdate .

i dont know how to get these values in my function getfieldsvalues , i tried to use this syntax :

self.employee = self.employee 




Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
nov 22
2994
0
mar 21
2443
2
jan 20
21097
2
máj 18
3721
3
máj 18
4802