Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2430 Представления

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
21578
1
мар. 19
5255
0
дек. 18
13
0
янв. 17
2815
1
мая 16
4419