This question has been flagged

Hi,

For our (personal) webshop I need to get the product price using the pricelist linked to a company

I manage to get the fixed price from a pricelist but when I change the Price Computation from "Fixed price" to "Percentage (discount)" (Percentage Price: 10%) it returns an error.


- I'm using the external API (XML-RPC) in combination with PHP.
https://www.odoo.com/documentation/master/webservices/odoo.html

- Odoo 14.0+e (Enterprise Edition).


My code:
return $models->execute_kw($db, $uid, $pw, 'product.pricelist', 'price_get', [['4'],84,1]);

When the product (ID 84) in the pricelist (ID 4) has a fixed price it returns the correct product price.

After changing the fixed price to a discount price in Odoo I get this error:

Array
(
    [faultCode] => 4
    [faultString] => Database fetch misses ids (('4',)) and has extra ids ((4,)), may be caused by a type incoherence in a previous request
)


I was looking into the Odoo code but I don't have experience using Python.
https://github.com/odoo/odoo/blob/14.0/addons/product/models/product_pricelist.py


I hope someone can help,

Kind regards,
Jeroen

 

Avatar
Discard