Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2436 Visualizzazioni

Hi,

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

Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
lug 20
21582
1
mar 19
5256
0
dic 18
13
0
gen 17
2815
1
mag 16
4420