Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2445 Переглядів

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
21594
1
бер. 19
5296
0
груд. 18
13
0
січ. 17
2825
1
трав. 16
4437