diff --git a/bin/netsvc.py b/bin/netsvc.py index 1a806d53766..a9a23e9e778 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -232,6 +232,7 @@ class OpenERPDispatcher: self.log('service', service_name) self.log('method', method) self.log('params', params) + print "Terp Calling",service_name,method,params result = LocalService(service_name)(method, *params) self.log('result', result) return result diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 426b738f338..d6f7e343402 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -199,10 +199,7 @@ class rml_parse(object): def set_html_image(self,attach_id): try : att_id = int(attach_id) - print att_id attachment = self.pool.get('ir.attachment').browse(self.cr,self.uid,att_id) - print attachment - print attachment.datas return attachment.datas except : return '' @@ -502,22 +499,22 @@ class report_sxw(report_rml, preprocess.report): def create_single_html2html(self, cr, uid, ids, data, report_xml, context={}): context = context.copy() report_type = 'html' - context['parents'] = html_parents - - rml = report_xml.report_rml_content - - rml_parser = self.parser(cr, uid, self.name2, context) - rml_parser.parents = html_parents - rml_parser.tag = sxw_tag + context['parents'] = html_parents + + html = report_xml.report_rml_content + html_parser = self.parser(cr, uid, self.name2, context) + html_parser.parents = html_parents + html_parser.tag = sxw_tag objs = self.getObjects(cr, uid, ids, context) - rml_parser.set_context(objs, data, ids, report_type) + html_parser.set_context(objs, data, ids, report_type) + + html_dom = etree.HTML(html) + html_dom = self.preprocess_rml(html_dom,'html2html') - rml_dom = etree.HTML(rml) - rml_dom = self.preprocess_rml(rml_dom,'html2html') create_doc = self.generators['html2html'] - html = etree.tostring(create_doc(rml_dom, rml_parser.localcontext)) + html = etree.tostring(create_doc(html_dom, html_parser.localcontext)) - return (html, report_type) + return (html.replace('<', '<').replace('>', '>').replace('
',''), report_type)