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

Hi everyone.

I have to update everytime one field's value based on another object's field. How to achieve it.Please share ur ideas.Thanks in advance.

アバター
破棄
最善の回答

Yes u can go to create method in that model check condition and update value.

@api.model

def create(self, vals):

    if values[u'key1'] = 'Something':

        values[u'key2'] = 'update value' 

     <remaining code>

アバター
破棄
関連投稿 返信 ビュー 活動
10
5月 20
8373
1
1月 16
6038
1
1月 25
22771
1
5月 21
4950
5
1月 17
4053