Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
2485 Visninger

Hi,

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

Avatar
Kassér
Bedste svar

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

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
jul. 20
21665
1
mar. 19
5305
0
dec. 18
13
0
jan. 17
2921
1
maj 16
4489