コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2443 ビュー

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
7月 20
21592
1
3月 19
5293
0
12月 18
13
0
1月 17
2824
1
5月 16
4436