Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4478 Представления

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>

Аватар
Отменить
Related Posts Ответы Просмотры Активность
10
мая 20
8531
1
янв. 16
6179
1
янв. 25
23043
1
мая 21
5271
5
янв. 17
4213