跳至内容
菜单
此问题已终结
5590 查看

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 




形象
丢弃
相关帖文 回复 查看 活动
1
11月 22
2990
0
3月 21
2440
2
1月 20
21085
2
5月 18
3715
3
5月 18
4802