Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
4752 Zobrazení

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.

Avatar
Zrušit
Nejlepší odpověď

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"
}])
Avatar
Zrušit
Autor

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

Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
2568
0
kvě 23
2317
3
bře 25
24011
1
lis 22
2259
1
kvě 22
5744