diff options
| author | ced <> | 2007-09-06 14:12:48 +0000 |
|---|---|---|
| committer | ced <> | 2007-09-06 14:12:48 +0000 |
| commit | b159fc8223f55f1d2be7b59cb3e2ff8119cd5545 (patch) | |
| tree | 0b9d9b4e9fa12d3c909ce427ebd5e574b359c1ab /addons | |
| parent | 7c29408aea7da1f1f8c3ba73971aa90f18ca4a6c (diff) | |
Fix product cost structure report for new properties handeling
bzr revid: ced-a73a3a3df71c783d9c050458497677030ffe5803
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mrp/report/price.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 6c7f39edbc2..45affd026b7 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -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) |
