decimal_precision done a rounding after two digits even set the decimal accuracy more then 2

Bug #902571 reported by Ariel E. Figueroa - http://www.humanytek.com
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP R&D Addons Team 1

Bug Description

As reproduce the problem:
1. set decimal precision 4 digit purchases
2. generate a purchase order
3. enter a unit price to 4 decimal in the purchase
4. validate that the total line is not considering the last 2 decimal multiplication

Related branches

Revision history for this message
Ariel E. Figueroa - http://www.humanytek.com (arielfigue) wrote :
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

Hello Ariel

Can you verify the currency precision too?

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Ariel E. Figueroa - http://www.humanytek.com (arielfigue) wrote :

Hi, this is verified and with this the error continues.

Regards
AEF

Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

Can you send us a image similar.
With you configuration of currency & configuration of decimal, please

Revision history for this message
Ariel E. Figueroa - http://www.humanytek.com (arielfigue) wrote :

Ready Moy: 2 Files was uploaded, greetings!!

AEF

Revision history for this message
Ariel E. Figueroa - http://www.humanytek.com (arielfigue) wrote :

Currency configuration.

Revision history for this message
Eric Caudal - www.elico-corp.com (elicoidal) wrote :

Rounding factor in currency should be 0.0001

Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

Ariel
Rounding factor in currency is 0.0100 (2 digits)

Eric told the solution
Rounding factor in currency should be 0.0001.

Changed in openobject-addons:
status: Incomplete → Invalid
importance: Undecided → Low
assignee: nobody → Moisés López - http://www.vauxoo.com (moylop260)
Revision history for this message
Ariel E. Figueroa - http://www.humanytek.com (arielfigue) wrote :

Moises and Eric:

Thank you both for this tip, I did the settings that you tell, but the problem persists, I need to insist that this is a valid bug.

Regards
AEF

Changed in openobject-addons:
status: Invalid → Confirmed
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

Hello Ariel

This bug is invalid.
You will need verifiy you configuration
I put a image example

Changed in openobject-addons:
status: Confirmed → Invalid
milestone: none → 6.0.4
Revision history for this message
Numérigraphe (numerigraphe) wrote :

We met the same problem on a database migrated from v5.0 to v6.0. In our case, the data type of the columns were not changed according to the new decimal precision improvements in v6.0.
We asked the migration team to fix it.
Lionel

Changed in openobject-addons:
status: Invalid → Confirmed
assignee: Moisés López - http://www.vauxoo.com (moylop260) → nobody
summary: - decimal_precision dont calculate the last 2 digits
+ decimal_precision doesn't calculate the last 2 digits after migration
+ from v5.0
Amit Parik (amit-parik)
summary: - decimal_precision doesn't calculate the last 2 digits after migration
- from v5.0
+ decimal_precision done a rounding after two digits even set the decimal
+ accuracy more then 2
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
Revision history for this message
Bogdan Stanciu (bstanciu) wrote : Re: [Bug 902571] Re: decimal_precision done a rounding after two digits even set the decimal accuracy more then 2

On 22. 06. 12 15:23, Amit Parik (OpenERP) wrote:
> ** Summary changed:
>
> - decimal_precision doesn't calculate the last 2 digits after migration from v5.0
> + decimal_precision done a rounding after two digits even set the decimal accuracy more then 2
>
> ** Changed in: openobject-addons
> Assignee: (unassigned) => OpenERP R&D Addons Team 1 (openerp-dev-addons1)
>
Hello,

This is not limited to purchases, it is also happening for sales (and
other modules).

The explanation is quite simple: all prices (with taxes) are calculated
by the 'compute_all' function in 'account/account.py'.

And there, the decimal precision is HARDCODED to 'Account'. So whatever
you set-up for the 'Account' precision, will hold for all other ones
(unless of course you set dp=2 for e.g. Purchases and dp=3 for Account,
then you will get dp=2 for purchases)

Somehow this is reasonable, as why would you keep different levels of
precision between accounts and purchases (which eventually end up in
'accounts')?

However, at least from a flexibility point of view, things can be
improved, and leave the decision on the user.

Maybe a discussion on the experts list could add some insight...

A simple solution would be to set-up accounts to dp=4; however, this
puts 4 decimals on all accounting reports!!

regards,
Bogdan

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.