Using PHP and the XML RPC Odoo API I would like to update the stock quantity of a product.
To simplify the task of using XML RPC I use the "OdooClient" library by Robroypt:
https://github.com/robroypt/odoo-client
When i try:
$response = $this->getClient('object')->execute_kw(
$this->database,
$this->uid(),
$this->password,
'stock.change.product.qty',
'change_product_qty',
[[
'location_id' => 15,
'new_quantity' => (float) 10, //New quantity
'product_id' => 157, //My product
'product_tmpl_id' => 87, //My product template
]]
);
Strangely I get errors like:
DataError: invalid input syntax for integer: "product_tmpl_id"
That doesn't make much sense.
Is it even possible to call methods like "change_product_qty" from the XML RPC API?
My question is similar as this question but mine is for v10:
https://www.odoo.com/forum/help-1/question/update-quantity-on-hand-via-xmlrpc-and-php-82281