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
=== modified file 'bin/report/render/rml2pdf/trml2pdf.py'
--- bin/report/render/rml2pdf/trml2pdf.py 2011-10-13 12:12:25 +0000
+++ bin/report/render/rml2pdf/trml2pdf.py 2011-12-06 07:04:24 +0000
@@ -610,11 +610,11 @@
610 for key in txt_n.attrib.keys():610 for key in txt_n.attrib.keys():
611 if key in ('rml_except', 'rml_loop', 'rml_tag'):611 if key in ('rml_except', 'rml_loop', 'rml_tag'):
612 del txt_n.attrib[key]612 del txt_n.attrib[key]
613 if True or not self._textual(n).isspace():613
614 if not n.tag == 'bullet':614 if not n.tag == 'bullet':
615 txt_n.text = utils.xml2str(self._textual(n))615 txt_n.text = utils.xml2str(self._textual(n))
616 txt_n.tail = n.tail and utils._process_text(self, n.tail.replace('\n','')) or ''616 txt_n.tail = n.tail and utils.xml2str(utils._process_text(self, n.tail.replace('\n',''))) or ''
617 rc1 += etree.tostring(txt_n)617 rc1 += etree.tostring(txt_n)
618 return rc1618 return rc1
619619
620 def _table(self, node):620 def _table(self, node):
621621
=== modified file 'bin/report/render/rml2pdf/utils.py'
--- bin/report/render/rml2pdf/utils.py 2010-12-28 11:09:29 +0000
+++ bin/report/render/rml2pdf/utils.py 2011-12-06 07:04:24 +0000
@@ -130,10 +130,10 @@
130 except Exception:130 except Exception:
131 pass131 pass
132 if isinstance(txt, basestring):132 if isinstance(txt, basestring):
133 result += str2xml(txt)133 result += txt
134 elif txt and (txt is not None) and (txt is not False):134 elif txt and (txt is not None) and (txt is not False):
135 result += ustr(txt)135 result += ustr(txt)
136 return result136 return str2xml(result)
137137
138def text_get(node):138def text_get(node):
139 return ''.join([ustr(n.text) for n in node])139 return ''.join([ustr(n.text) for n in node])