Skip to Content
Menu
This question has been flagged
2842 Views

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
Discard
Related Posts Replies Views Activity
1
Nov 22
1817
0
Mar 21
1548
2
Jan 20
19658
2
May 18
2892
3
May 18
4122