OpenERP V6.02 : monthly turnover (from partner form) : price excluding VAT doesn't include discounts

Bug #814613 reported by Thomas Rogeau
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
In Progress
Low
OpenERP Publisher's Warranty Team

Bug Description

1) to reproduce
A. create a partner
B. create and validate an invoice for him, let's say a 800 € tax excluded product with a discount of 25%. The real tax excluded sell is 600 €.
C. return on the Partner Form, click on the right part on "Monthly Turnover" (rough translation, I'm working in french and the text is "Chiffre d'affaire mensuel")

(see attachment)
2) and 3) And now the bug : in the tax excluded total column, it's written 800 € instead of 600 €.
As the Tax INCLUDED Total is correct (717,60 with 19,6 % VAT), we can see a tax included total smaller than tax excluded one. Great impact in front of a customer... :_-(

4) Platforms : windows with all-in-one 6.02 install, Ubuntu with 6.02 install. Confirmed on each.

Revision history for this message
Thomas Rogeau (thomas-r59-deactivatedaccount) wrote :
Revision history for this message
Thomas Rogeau (thomas-r59-deactivatedaccount) wrote :

Precision : the invoice being paid or not.

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Dhruti Shastri(OpenERP) (dhs-openerp) wrote :

Hello,

I could meet with the same error with latest stable 6.0 (revno 4735). For Trunk it is working perfectly fine.

So I am assigning this bug to OPW Team.

For more reference, I have attached a video.

Revision history for this message
Thomas Rogeau (thomas-r59-deactivatedaccount) wrote :

I think I have found the bug, it's in /Server/addons/account/report/account_invoice_report.py :

here a paste with a suggested bugfix :
           /* TRO310711 bugfix for bug #814613 : OpenERP V6.02 : monthly turnover (from partner form) : price excluding VAT doesn't include discounts
                commented following lines
                    sum(case when ai.type in ('out_refund','in_invoice') then
                         ail.quantity*ail.price_unit * -1
                        else
                         ail.quantity*ail.price_unit
                        end) / cr.rate as price_total,
           + added following lines */
                    sum(case when ai.type in ('out_refund','in_invoice') then
                         ail.price_subtotal * -1
                        else
                         ail.price_subtotal
                        end) / cr.rate as price_total,
            /*TRO310711 end of bugfix*/

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Thomas Rogeau (thomas-r59-deactivatedaccount) wrote :

Still exists in 6.0.3.
Do you know why it's working in Trunk ?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.