Fix product cost structure report for new properties handeling
bzr revid: ced-a73a3a3df71c783d9c050458497677030ffe5803
This commit is contained in:
@@ -53,9 +53,8 @@ class report_custom(report_rml):
|
||||
main_strd_price = ''
|
||||
if prod.seller_ids and prod.seller_ids[0] :
|
||||
main_sp_name = '<b>' + prod.seller_ids[0].name.name + '</b>\r\n'
|
||||
pricelist = prod.seller_ids[0].name.property_product_pricelist_purchase.id
|
||||
if pricelist:
|
||||
pricelist_id = pricelist[0]
|
||||
pricelist_id = prod.seller_ids[0].name.property_product_pricelist_purchase.id
|
||||
if pricelist_id:
|
||||
pricelist_obj = pooler.get_pool(cr.dbname).get('product.pricelist')
|
||||
price = pricelist_obj.price_get(cr,uid,[pricelist_id], prod.id, number*prod_qtty or 1.0).setdefault(pricelist_id, 0)
|
||||
price = pooler.get_pool(cr.dbname).get('res.currency').compute(cr, uid, pricelist_obj.browse(cr, uid, pricelist_id).currency_id.id, currency_id, price)
|
||||
@@ -71,9 +70,8 @@ class report_custom(report_rml):
|
||||
sellers_price = ''
|
||||
for seller_id in prod.seller_ids:
|
||||
sellers += '- <i>'+ seller_id.name.name +'</i>\r\n'
|
||||
pricelist = seller_id.name.property_product_pricelist_purchase.id
|
||||
if pricelist:
|
||||
pricelist_id = pricelist[0]
|
||||
pricelist_id = seller_id.name.property_product_pricelist_purchase.id
|
||||
if pricelist_id:
|
||||
pricelist_obj = pooler.get_pool(cr.dbname).get('product.pricelist')
|
||||
price = pricelist_obj.price_get(cr,uid,[pricelist_id], prod.id, number*prod_qtty or 1.0).setdefault(pricelist_id, 0)
|
||||
price = pooler.get_pool(cr.dbname).get('res.currency').compute(cr, uid, pricelist_obj.browse(cr, uid, pricelist_id).currency_id.id, currency_id, price)
|
||||
|
||||
Reference in New Issue
Block a user