I want to update the available stock of a product, this is what I have:
data = {
'product_id':product_rec.id,
'location_id': location_rec.id,
'inventory_quantity':product_qty
}
self.env['stock.quant'].sudo().create(data)
Doesn't seem to update anything.
Thank you