İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2480 Görünümler

Hi,

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

Avatar
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 20
21653
1
Mar 19
5304
0
Ara 18
13
0
Oca 17
2913
1
May 16
4489