Merge lp:~openerp-community/openobject-server/fix_6.0_723662 into lp:openobject-server/6.0

Proposed by Lorenzo Battistini
Status: Needs review
Proposed branch: lp:~openerp-community/openobject-server/fix_6.0_723662
Merge into: lp:openobject-server/6.0
Diff against target: 33 lines (+4/-4)
1 file modified
bin/report/report_sxw.py (+4/-4)
To merge this branch: bzr merge lp:~openerp-community/openobject-server/fix_6.0_723662
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+65366@code.launchpad.net

Description of the change

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

To post a comment you must log in.

Unmerged revisions

3447. By Lorenzo Battistini

[FIX] bug 723662 for 6.0

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/report/report_sxw.py'
2--- bin/report/report_sxw.py 2011-01-10 13:28:32 +0000
3+++ bin/report/report_sxw.py 2011-06-21 15:55:11 +0000
4@@ -77,7 +77,7 @@
5 class _float_format(float, _format):
6 def __init__(self,value):
7 super(_float_format, self).__init__()
8- self.val = value
9+ self.val = value or 0.0
10
11 def __str__(self):
12 digits = 2
13@@ -85,17 +85,17 @@
14 digits = self._field.digits[1]
15 if hasattr(self, 'lang_obj'):
16 return self.lang_obj.format('%.' + str(digits) + 'f', self.name, True)
17- return self.val
18+ return str(self.val)
19
20 class _int_format(int, _format):
21 def __init__(self,value):
22 super(_int_format, self).__init__()
23- self.val = value and str(value) or str(0)
24+ self.val = value or 0
25
26 def __str__(self):
27 if hasattr(self,'lang_obj'):
28 return self.lang_obj.format('%.d', self.name, True)
29- return self.val
30+ return str(self.val)
31
32 class _date_format(str, _format):
33 def __init__(self,value):