price_get_multi() code mismatching ids ?
Version 6
I am getting no matching pricelist when my product_pricelist does not have the same "id" as the product_
Some data:
product_
id=7
pricelist_id=4
product_pricelist:
id=4
product_
id=7
price_version_id=7
Arguments to price_get_multi() are:
self = <product.
cr = <sql_db.Cursor object at 0xac63b4c>
uid = 1
pricelist_ids = [4L]
products_
context = {'date': '2010-12-17', 'uom': False}
Generated sql as follows:
select i.*, pl.currency_id from
product_
product_
product_pricelist as pl
where (product_tmpl_id is NULL OR product_tmpl_id = 1)
and (product_id is NULL or product_id = 1)
AND (categ_id in (2,3,1) OR (categ_id IS NULL))
AND price_version_id = 4
AND (min_quantity IS NULL OR min_quantity <= 1)
AND i.price_version_id = v.id AND v.pricelist_id = pl.id
ORDER BY sequence;
-------
product/
To my untrained eye it looks very strange.
Method "price_get_multi()" has code where "pricelist_
This look wrong. It is saying "pricelist_
In my case above, the sql is plugging using a pricelist_id of "4" in the where clause of "price_version_id" (should have value of 7)
Am I reading this right or going crazy ?
Question information
- Language:
- English Edit question
- Status:
- Open
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask snook for more information if necessary.