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

I am trying to update the sales order within Odoo 13 via the API


 so_id = models.execute_kw(db, uid, password, 'sales order', 'write'[{

          'name': 'order name"

           #update state 

        }])

This however does not work. Per the documentation https://www.odoo.com/documentation/13.0/webservices/odoo.html we should user the write method to update records, and I have done so but still can't figure out the issue. When I attempt to write to Odoo it just returns a 500 error.

Аватар
Отменить
Лучший ответ

The documentation gives an example with the ID of the record you want to change, so I would start by fixing that:

models.execute_kw(db, uid, password, 'res.partner', 'write', [[id], {
    'name': "Newer partner"
}])
Аватар
Отменить
Автор

I did end up figuring it but thank you. I wasn't marking the ID correctly on my end.

Related Posts Ответы Просмотры Активность
1
июл. 25
2567
0
мая 23
2317
3
мар. 25
24002
1
нояб. 22
2257
1
мая 22
5743