← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 663045] Re: using the decimal module instead of __builtins__.float

 

sorry, I mis-selected oo-library, instead of oo-server

** Project changed: openobject-library => openobject-server

-- 
using the decimal module instead of __builtins__.float
https://bugs.launchpad.net/bugs/663045
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.

Status in OpenObject Server: New

Bug description:
I just had a look at the decimal module introduced in python 2.4 [1], and after another glance at the float field.

Is there a reason why we don't use the rounding-agnostic decimal module instead of the float type?

As far as I can see, only a few lines should be changed, something like this in fields.py:float

_symbol_f = lambda x: decimal.Decimal(str(x) or '0.0')

[1]: http://docs.python.org/library/decimal.html





References