تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
4794 أدوات العرض

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
يوليو 25
2594
0
مايو 23
2322
3
مارس 25
24051
1
نوفمبر 22
2271
1
مايو 22
5754