wrong number of decimal for discount in sale order

Bug #772308 reported by OpenBMS JSC
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

If I configure decimal for sale to 0 (i.e. values end up in xxx.00) then the discount in report doesn't show the correct %: it's rounded to zero as well, while it's shown correctly on form

Maybe we need to have separate decimal control for discount (%)?

Related branches

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :
Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :
Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

The "Quotation / Order" report works ok, the "Order with Layout" is not correct as reported

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

Please ignore my previous comment (#3), it's posted to the wrong bug.

The digits=... should be removed, or it should use different Digit Precision

Line 282, sale/report/sale_order.rml

          <td>
            <para style="terp_default_Centre_9">[[ formatLang(line.discount, digits=get_digits(dp='Sale Price')) ]]</para>
          </td>

and line 295, sale_layout/report/report_sale_layout.rml
            <para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font> [[ formatLang(a['discount'], digits=get_digits(dp='Sale Price')) ]]</para>

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

this should be fixed both trunk and 6.0 series

Amit Parik (amit-parik)
summary: - [6.0.2] wrong number of decimal for discount in sale order
+ wrong number of decimal for discount in sale order
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
status: In Progress → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello Phong,

I have tested as your description and get the same problem.
And your attached patch is working fine for this.
It will be merged soon in trunk addons.

Revision ID: <email address hidden>
Revision No: 4685

Thanks for participation !

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

This bug affects the stable 6.0.2 too, so I hope that it will get fixed there as well.

Changed in openobject-addons:
milestone: none → 6.1
qdp (OpenERP) (qdp)
Changed in openobject-addons:
status: Fix Committed → Fix Released
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.