콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4739 화면

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.

관련 게시물 답글 화면 활동
1
7월 25
2549
0
5월 23
2313
3
3월 25
23974
1
11월 22
2231
1
5월 22
5737