openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00374
[Merge] lp:~openerp-community/openobject-server/fix_6.0_723662 into lp:openobject-server/6.0
Lorenzo Battistini - Agile BG - Domsense has proposed merging lp:~openerp-community/openobject-server/fix_6.0_723662 into lp:openobject-server/6.0.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #723662 in OpenERP Server: "Unable to print 0.00 float value on a report"
https://bugs.launchpad.net/openobject-server/+bug/723662
For more details, see:
https://code.launchpad.net/~openerp-community/openobject-server/fix_6.0_723662/+merge/65366
This fixes bug 723662 for 6.0 series
I tested the patch proposed here
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-bug-723662-ysa/+merge/62862
and it works
--
https://code.launchpad.net/~openerp-community/openobject-server/fix_6.0_723662/+merge/65366
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-server/fix_6.0_723662.
=== modified file 'bin/report/report_sxw.py'
--- bin/report/report_sxw.py 2011-01-10 13:28:32 +0000
+++ bin/report/report_sxw.py 2011-06-21 15:55:11 +0000
@@ -77,7 +77,7 @@
class _float_format(float, _format):
def __init__(self,value):
super(_float_format, self).__init__()
- self.val = value
+ self.val = value or 0.0
def __str__(self):
digits = 2
@@ -85,17 +85,17 @@
digits = self._field.digits[1]
if hasattr(self, 'lang_obj'):
return self.lang_obj.format('%.' + str(digits) + 'f', self.name, True)
- return self.val
+ return str(self.val)
class _int_format(int, _format):
def __init__(self,value):
super(_int_format, self).__init__()
- self.val = value and str(value) or str(0)
+ self.val = value or 0
def __str__(self):
if hasattr(self,'lang_obj'):
return self.lang_obj.format('%.d', self.name, True)
- return self.val
+ return str(self.val)
class _date_format(str, _format):
def __init__(self,value):