Merge lp:~openerp-dev/openobject-addons/6.0-opw-576147-jap into lp:openobject-addons/6.0

Proposed by Jagdish Panchal (Open ERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 5280
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-576147-jap
Merge into: lp:openobject-addons/6.0
Diff against target: 15 lines (+2/-2)
1 file modified
account/report/account_invoice_report.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-576147-jap
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+112978@code.launchpad.net

Description of the change

Hello,

Steps to Reproduce the issue:

1) Create an invoice, for CPU1 (discount 20%) and CPU2 (discount 30%) and Validate.

2) Go to Accounting>Reporting>Statistic Reports>invoice analysis the average price is wrong.

3) Average price should be calculated after deducting discount if any

This MP contains fix for this issue

Thanks

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

5280. By Jagdish Panchal (Open ERP)

[FIX] account: Fix the problem wrong product average price in Invoices Analysis report(Maintenance Case : 576147)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/report/account_invoice_report.py'
2--- account/report/account_invoice_report.py 2012-03-15 10:08:19 +0000
3+++ account/report/account_invoice_report.py 2012-07-02 06:56:22 +0000
4@@ -132,9 +132,9 @@
5 ELSE 1
6 END) / cr.rate as price_total_tax,
7 (case when ai.type in ('out_refund','in_invoice') then
8- sum(ail.quantity*ail.price_unit*-1)
9+ sum(ail.quantity*ail.price_subtotal*-1)
10 else
11- sum(ail.quantity*ail.price_unit)
12+ sum(ail.quantity*ail.price_subtotal)
13 end) / (CASE WHEN
14 (case when ai.type in ('out_refund','in_invoice')
15 then sum(ail.quantity/u.factor*-1)