Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2490 มุมมอง

Hi,

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 20
21677
1
มี.ค. 19
5311
0
ธ.ค. 18
13
0
ม.ค. 17
2929
Onchange many2one partner_bank_id แก้ไขแล้ว
1
พ.ค. 16
4500