Merge lp:~openerp-dev/openobject-server/6.0-opw-50912-skh into lp:openobject-server/6.0

Proposed by Somesh Khare
Status: Merged
Approved by: Vinay Rana (OpenERP)
Approved revision: 3548
Merged at revision: 3556
Proposed branch: lp:~openerp-dev/openobject-server/6.0-opw-50912-skh
Merge into: lp:openobject-server/6.0
Diff against target: 37 lines (+7/-7)
2 files modified
bin/report/render/rml2pdf/trml2pdf.py (+5/-5)
bin/report/render/rml2pdf/utils.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.0-opw-50912-skh
Reviewer Review Type Date Requested Status
Vinay Rana (OpenERP) (community) Approve
Lorenzo Battistini (community) Approve
Priyesh (OpenERP) Pending
Review via email: mp+84573@code.launchpad.net

Description of the change

Hello,

I back ported the code from the Trunk Server Revision:3781, which resolved the issue for report crashes on having the &(Am percent) in the name field.

I have changed the code according to the Trunk Server revision and tested the issue.

Kindly review the issue and share your views on it.

Thanks
Somesh Khare

To post a comment you must log in.
Revision history for this message
Lorenzo Battistini (elbati) wrote :
review: Approve
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

As per my test cases It fixes the issue.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/report/render/rml2pdf/trml2pdf.py'
2--- bin/report/render/rml2pdf/trml2pdf.py 2011-10-13 12:12:25 +0000
3+++ bin/report/render/rml2pdf/trml2pdf.py 2011-12-06 07:04:24 +0000
4@@ -610,11 +610,11 @@
5 for key in txt_n.attrib.keys():
6 if key in ('rml_except', 'rml_loop', 'rml_tag'):
7 del txt_n.attrib[key]
8- if True or not self._textual(n).isspace():
9- if not n.tag == 'bullet':
10- txt_n.text = utils.xml2str(self._textual(n))
11- txt_n.tail = n.tail and utils._process_text(self, n.tail.replace('\n','')) or ''
12- rc1 += etree.tostring(txt_n)
13+
14+ if not n.tag == 'bullet':
15+ txt_n.text = utils.xml2str(self._textual(n))
16+ txt_n.tail = n.tail and utils.xml2str(utils._process_text(self, n.tail.replace('\n',''))) or ''
17+ rc1 += etree.tostring(txt_n)
18 return rc1
19
20 def _table(self, node):
21
22=== modified file 'bin/report/render/rml2pdf/utils.py'
23--- bin/report/render/rml2pdf/utils.py 2010-12-28 11:09:29 +0000
24+++ bin/report/render/rml2pdf/utils.py 2011-12-06 07:04:24 +0000
25@@ -130,10 +130,10 @@
26 except Exception:
27 pass
28 if isinstance(txt, basestring):
29- result += str2xml(txt)
30+ result += txt
31 elif txt and (txt is not None) and (txt is not False):
32 result += ustr(txt)
33- return result
34+ return str2xml(result)
35
36 def text_get(node):
37 return ''.join([ustr(n.text) for n in node])