Regression: Reports fail with accented characters in the company header

Bug #662598 reported by Dukai Gábor
This bug report is a duplicate of:  Bug #537449: Report Fails to handle accented chars. Edit Remove
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Confirmed
Medium
Unassigned
Trunk
Confirmed
Medium
Jay Vora (Serpent Consulting Services)

Bug Description

Hi!
5.0 latest bzr.
Reports can't be created if the company's header has accented characters in it. Try with a picking, for example.
This regression happened somewhere between rev 2116 and 2143.

Related branches

Revision history for this message
Dukai Gábor (gdukai) wrote :

Traceback (most recent call last):
  File "bin/service/web_services.py", line 683, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "bin/report/report_sxw.py", line 365, in create
    fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
  File "bin/report/report_sxw.py", line 427, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "bin/report/report_sxw.py", line 448, in create_single_pdf
    pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
  File "bin/report/interface.py", line 183, in create_pdf
    obj.render()
  File "bin/report/render/render.py", line 50, in render
    result = self._render()
  File "bin/report/render/rml.py", line 41, in _render
    return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
  File "bin/report/render/rml2pdf/trml2pdf.py", line 791, in parseNode
    r.render(fp)
  File "bin/report/render/rml2pdf/trml2pdf.py", line 205, in render
    pt_obj.render(el)
  File "report/render/rml2pdf/trml2pdf.py", line 785, in render
    self.doc_tmpl.build(fis)
  File "/usr/local/lib/python2.6/dist-packages/reportlab-2.4-py2.6-linux-x86_64.egg/reportlab/platypus/doctemplate.py", line 874, in build
    self.clean_hanging()
  File "/usr/local/lib/python2.6/dist-packages/reportlab-2.4-py2.6-linux-x86_64.egg/reportlab/platypus/doctemplate.py", line 509, in clean_hanging
    self.handle_flowable(self._hanging)
  File "/usr/local/lib/python2.6/dist-packages/reportlab-2.4-py2.6-linux-x86_64.egg/reportlab/platypus/doctemplate.py", line 756, in handle_flowable
    f.apply(self)
  File "/usr/local/lib/python2.6/dist-packages/reportlab-2.4-py2.6-linux-x86_64.egg/reportlab/platypus/doctemplate.py", line 140, in apply
    getattr(doc,arn)(*args)
  File "/usr/local/lib/python2.6/dist-packages/reportlab-2.4-py2.6-linux-x86_64.egg/reportlab/platypus/doctemplate.py", line 534, in handle_pageBegin
    self.pageTemplate.onPage(self.canv,self)
  File "bin/report/render/rml2pdf/trml2pdf.py", line 448, in render
    cnv.render(self.node)
  File "bin/report/render/rml2pdf/trml2pdf.py", line 433, in render
    tags[n.tag](n)
  File "bin/report/render/rml2pdf/trml2pdf.py", line 249, in _drawString
    text=self._textual(node, **v)
  File "bin/report/render/rml2pdf/trml2pdf.py", line 230, in _textual
    rc = utils._process_text(self, text)
  File "bin/report/render/rml2pdf/utils.py", line 112, in _process_text
    result += tools.ustr(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
  File "bin/report/report_sxw.py", line 292, in _translate
    piece_list[pn] = piece_list[pn].replace(source_string, translated_string)
TypeError: function takes exactly 5 arguments (1 given)

Changed in openobject-server:
assignee: nobody → Jay (OpenERP) (jvo-openerp)
Changed in openobject-server:
status: New → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Dukai,

Can you check with this patch?
Thanks.

Revision history for this message
Dukai Gábor (gdukai) wrote :

It works, thank you!

summary: Regression: Reports fail with accented characters in the company header
- (5.0)
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Here is the patch for trunk.
Thanks.

Revision history for this message
Richard (John) Nopkins@Servosoft (richard-nopkins) wrote :

works well, thanks.
btw, jj ff is funny :D

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

http://launchpadlibrarian.net/57847977/report_unicode_trunk.patch doesn't merge cleanly to lp:~openerp/openobject-server/trunk/ (revno 3051). Please revise if this patch is still working, if not please remove it to avoid confusion and time wasting to do all the patching that doens't work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.