Skip to Content
Menu
This question has been flagged
1 Atsakyti
2484 Rodiniai

Hi,

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

Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
liep. 20
21662
1
kov. 19
5305
0
gruod. 18
13
0
saus. 17
2920
1
geg. 16
4489