Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4663 Lượt xem

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

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 23
3111
1
thg 11 16
5409
2
thg 5 23
8777
1
thg 3 18
4298
0
thg 5 23
2248