Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2416 Weergaven

Hi,

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

Avatar
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jul. 20
21576
1
mrt. 19
5245
0
dec. 18
13
0
jan. 17
2809
1
mei 16
4415