跳至内容
菜单
此问题已终结
1 回复
2417 查看

Hi,

how can i search a specific field (mobile) in res.partner using on_change function 

形象
丢弃
最佳答案

Hi Abir,

When you call an onchange function you can access any value from that model through self. For example:

@api.onchange('mobile')
def onchange_phone(self):
    # for example: get the value from the field 'mobile' in a variable named 'mobile'
mobile = self.mobile
# Set a static value on the field 'phone'. You can also use the 'mobile' variable or anything else here. self.phone = '014'

Regards,
Yenthe

形象
丢弃
相关帖文 回复 查看 活动
1
7月 20
21578
1
3月 19
5249
0
12月 18
13
0
1月 17
2809
1
5月 16
4415