The error happens with other reporting engines than the ReportLab. For example Aeroo Reports are using floating point value directly by using built in Python's __str__ method, which were overloaded by OpenERP server.
The method "__str__", when the float value is "0.00" still returns floating point value, which is against Python conventions:
The error happens with other reporting engines than the ReportLab. For example Aeroo Reports are using floating point value directly by using built in Python's __str__ method, which were overloaded by OpenERP server.
The method "__str__", when the float value is "0.00" still returns floating point value, which is against Python conventions:
http:// docs.python. org/reference/ datamodel. html#object. __str__
Quote> The return value must be a string object.
This is the code from the "report_sxw.py" file, line #77:
class _float_ format( float, _format): _(self, value):
super( _float_ format, self).__init__()
def __init_
self.val = value
def __str__(self): self,'_ field') and getattr( self._field, 'digits', None): digits[ 1] obj.format( '%.' + str(digits) + 'f', self.name, True)
digits = 2
if hasattr(
digits = self._field.
if hasattr(self, 'lang_obj'):
return self.lang_
return self.val
Pay attention to the last line, which evidently does not return string, as it should have.