Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
5838 Näkymät

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
marrask. 22
3305
0
maalisk. 21
2698
2
tammik. 20
21541
2
toukok. 18
3981
3
toukok. 18
5005