Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2426 Vues

Hi,

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

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
juil. 20
21578
1
mars 19
5251
0
déc. 18
13
0
janv. 17
2812
1
mai 16
4417