跳至內容
選單
此問題已被標幟
1 回覆
4369 瀏覽次數

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
8439
1
1月 16
6105
1
1月 25
22895
1
5月 21
5067
5
1月 17
4112