Generic Rounding trouble into OpenERP

Bug #472295 reported by Joël Grand-Guillaume @ camptocamp
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Hi !

I have a doubt about how OpenERP handle all rounding problematic. I think we have a trouble here which is linked to lots of other bug report. We always find a way to have a work around, but at the end, we may be must make something :)

All the trouble comes from rounding the float on X digits, according to price_accuracy. I think we should not round a float at all, but use the type Decimal in python to handle that rounding. Overall when we discuss about multi-currency accounting...

We have also unused filed into the currency, like "computation accuracy", and a "rounding" precision which is used instead of price_accuracy sometimes. So what is used where ? I think sometimes we take the price_accuracy, sometimes we take the rounding precision of the currency... It's not clear and I think we should review all of this.

I put here all reported bug I've seen talking about that:

Foreign currency invoice:
https://bugs.launchpad.net/openobject-addons/+bug/452854
Rounding Tax:
https://bugs.launchpad.net/openobject-addons/+bug/328077
Residual amount in invoice:
https://bugs.launchpad.net/openobject-addons/+bug/427869
Rounding regression:
https://bugs.launchpad.net/openobject-server/+bug/445535
Accuracy of float values doesn't match price_accuracy :
https://bugs.launchpad.net/openobject-client-web/+bug/459027

Comments and ideas welcome,

Regards,

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

I'll encode a blueprint for 5.2

Changed in openobject-server:
status: New → Invalid
Revision history for this message
Felix Schubert (input-fescon) wrote :

Hi Joel,

could you please tell me how the discussion ended up in Version 5? In the German forum there is a discussion about the correct python data type goin' on and from our point of view its an bug to use a float instead of an int.

Best regards

Felix

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.