Somesh Khare has proposed merging 
lp:~openerp-dev/openobject-server/6.0-opw-50912-skh into 
lp:openobject-server/6.0.

Requested reviews:
  Priyesh (OpenERP) (pso-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-50912-skh/+merge/84573

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
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-50912-skh/+merge/84573
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/6.0-opw-50912-skh.
=== 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 @@
             for key in txt_n.attrib.keys():
                 if key in ('rml_except', 'rml_loop', 'rml_tag'):
                     del txt_n.attrib[key]
-            if True or not self._textual(n).isspace():
-                if not n.tag == 'bullet':
-                    txt_n.text = utils.xml2str(self._textual(n))
-                txt_n.tail = n.tail and utils._process_text(self, n.tail.replace('\n','')) or ''
-                rc1 += etree.tostring(txt_n)
+
+            if not n.tag == 'bullet':
+                txt_n.text = utils.xml2str(self._textual(n))
+            txt_n.tail = n.tail and utils.xml2str(utils._process_text(self, n.tail.replace('\n',''))) or ''
+            rc1 += etree.tostring(txt_n)
         return rc1
 
     def _table(self, node):

=== 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 @@
                 except Exception:
                     pass
                 if isinstance(txt, basestring):
-                    result += str2xml(txt)
+                    result += txt
                 elif txt and (txt is not None) and (txt is not False):
                     result += ustr(txt)
-        return result
+        return str2xml(result)
 
 def text_get(node):
     return ''.join([ustr(n.text) for n in node])

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to