Amit Dodiya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-55943-ado into
lp:openobject-addons/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-55943-ado/+merge/87733
Hello,
[FIX] Purchase Analysis report - Purchase standard price progress bar
calculation incorrect"
Thanks,
Amit
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-55943-ado/+merge/87733
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-55943-ado.
=== modified file 'purchase/report/purchase_report.py'
--- purchase/report/purchase_report.py 2011-05-27 05:53:16 +0000
+++ purchase/report/purchase_report.py 2012-01-06 11:57:37 +0000
@@ -103,7 +103,7 @@
extract(epoch from age(l.date_planned,s.date_order))/(24*60*60)::decimal(16,2) as delay_pass,
count(*) as nbr,
(l.price_unit*l.product_qty*u.factor)::decimal(16,2) as price_total,
- avg(100.0 * (l.price_unit*l.product_qty*u.factor) / NULLIF(t.standard_price*l.product_qty*u.factor, 0.0))::decimal(16,2) as negociation,
+ avg(100.0 * (l.price_unit*l.product_qty*u.factor) / NULLIF(t.standard_price*l.product_qty*u.factor, 0.0) / rcr.rate)::decimal(16,2) as negociation,
sum(t.standard_price*l.product_qty*u.factor)::decimal(16,2) as price_standard,
(sum(l.product_qty*l.price_unit)/NULLIF(sum(l.product_qty*u.factor),0.0))::decimal(16,2) as price_average
@@ -112,6 +112,10 @@
left join product_product p on (l.product_id=p.id)
left join product_template t on (p.product_tmpl_id=t.id)
left join product_uom u on (u.id=l.product_uom)
+ left join product_pricelist pl on (s.pricelist_id=pl.id)
+ left join res_currency rc on (pl.currency_id=rc.id)
+ left join res_currency_rate rcr on (rc.id=rcr.currency_id)
+
where l.product_id is not null
group by
s.company_id,
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp