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

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
8529
1
1月 16
6178
1
1月 25
23040
1
5月 21
5261
5
1月 17
4208