تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2420 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 20
21578
1
مارس 19
5249
0
ديسمبر 18
13
0
يناير 17
2810
1
مايو 16
4416