Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2413 Tampilan

Hi,

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

Avatar
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jul 20
21570
1
Mar 19
5243
0
Des 18
13
0
Jan 17
2802
1
Mei 16
4409