Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2481 Zobrazení

Hi,

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 20
21657
1
bře 19
5305
0
pro 18
13
0
led 17
2916
1
kvě 16
4489