{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/21029","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/21029/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/21029/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/21029/events","html_url":"https://github.com/odoo/odoo/issues/21029","id":274812433,"number":21029,"title":"Error on trying to print invoice with local charset","user":{"login":"boumboum","id":17336267,"avatar_url":"https://avatars1.githubusercontent.com/u/17336267?v=4","gravatar_id":"","url":"https://api.github.com/users/boumboum","html_url":"https://github.com/boumboum","followers_url":"https://api.github.com/users/boumboum/followers","following_url":"https://api.github.com/users/boumboum/following{/other_user}","gists_url":"https://api.github.com/users/boumboum/gists{/gist_id}","starred_url":"https://api.github.com/users/boumboum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boumboum/subscriptions","organizations_url":"https://api.github.com/users/boumboum/orgs","repos_url":"https://api.github.com/users/boumboum/repos","events_url":"https://api.github.com/users/boumboum/events{/privacy}","received_events_url":"https://api.github.com/users/boumboum/received_events","type":"User","site_admin":false},"labels":[{"id":712046675,"url":"https://api.github.com/repos/odoo/odoo/labels/11.0","name":"11.0","color":"80f438","default":false},{"id":459380541,"url":"https://api.github.com/repos/odoo/odoo/labels/Need%20information","name":"Need information","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-17T10:04:50Z","updated_at":"2018-03-22T16:11:51Z","closed_at":null,"author_association":"NONE","body":"Impacted versions: Odoo V11 exe (20171117)\r\n\r\nSteps to reproduce: create an invoice with (probably) some non English chars in the description/tax, etc. fields\r\n\r\nCurrent behavior: The attached error message\r\n\r\nExpected behavior:create the PDF\r\n\r\nVideo/Screenshot link (optional):\r\nHiba:\r\nOdoo Server Error\r\n\r\nTraceback (most recent call last):\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\generic.py\", line 484, in readFromStream\r\n    return NameObject(name.decode('utf-8'))\r\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 7: invalid continuation byte\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"C:\\Odoo\\server\\odoo\\addons\\web\\controllers\\main.py\", line 1647, in report_download\r\n    response = self.report_routes(reportname, docids=docids, converter='pdf')\r\n  File \"C:\\Odoo\\server\\odoo\\http.py\", line 512, in response_wrap\r\n    response = f(*args, **kw)\r\n  File \"C:\\Odoo\\server\\odoo\\addons\\web\\controllers\\main.py\", line 1596, in report_routes\r\n    pdf = report.with_context(context).render_qweb_pdf(docids, data=data)[0]\r\n  File \"C:\\Odoo\\server\\odoo\\addons\\base\\ir\\ir_actions_report.py\", line 641, in render_qweb_pdf\r\n    return self._post_pdf(save_in_attachment, pdf_content=pdf_content, res_ids=html_ids), 'pdf'\r\n  File \"C:\\Odoo\\server\\odoo\\addons\\base\\ir\\ir_actions_report.py\", line 551, in _post_pdf\r\n    writer.write(result_stream)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 482, in write\r\n    self._sweepIndirectReferences(externalReferenceMap, self._root)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 571, in _sweepIndirectReferences\r\n    self._sweepIndirectReferences(externMap, realdata)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 547, in _sweepIndirectReferences\r\n    value = self._sweepIndirectReferences(externMap, value)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 571, in _sweepIndirectReferences\r\n    self._sweepIndirectReferences(externMap, realdata)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 547, in _sweepIndirectReferences\r\n    value = self._sweepIndirectReferences(externMap, value)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 556, in _sweepIndirectReferences\r\n    value = self._sweepIndirectReferences(externMap, data[i])\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 571, in _sweepIndirectReferences\r\n    self._sweepIndirectReferences(externMap, realdata)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 547, in _sweepIndirectReferences\r\n    value = self._sweepIndirectReferences(externMap, value)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 586, in _sweepIndirectReferences\r\n    newobj = self._sweepIndirectReferences(externMap, newobj)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 547, in _sweepIndirectReferences\r\n    value = self._sweepIndirectReferences(externMap, value)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 547, in _sweepIndirectReferences\r\n    value = self._sweepIndirectReferences(externMap, value)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 577, in _sweepIndirectReferences\r\n    newobj = data.pdf.getObject(data)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\pdf.py\", line 1611, in getObject\r\n    retval = readObject(self.stream, self)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\generic.py\", line 66, in readObject\r\n    return DictionaryObject.readFromStream(stream, pdf)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\generic.py\", line 579, in readFromStream\r\n    value = readObject(stream, pdf)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\generic.py\", line 60, in readObject\r\n    return NameObject.readFromStream(stream, pdf)\r\n  File \"C:\\Odoo\\python\\lib\\site-packages\\PyPDF2\\generic.py\", line 492, in readFromStream\r\n    raise utils.PdfReadError(\"Illegal character in Name Object\")\r\nPyPDF2.utils.PdfReadError: Illegal character in Name Object\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/375363886","html_url":"https://github.com/odoo/odoo/issues/21029#issuecomment-375363886","issue_url":"https://api.github.com/repos/odoo/odoo/issues/21029","id":375363886,"user":{"login":"Yenthe666","id":6352350,"avatar_url":"https://avatars3.githubusercontent.com/u/6352350?v=4","gravatar_id":"","url":"https://api.github.com/users/Yenthe666","html_url":"https://github.com/Yenthe666","followers_url":"https://api.github.com/users/Yenthe666/followers","following_url":"https://api.github.com/users/Yenthe666/following{/other_user}","gists_url":"https://api.github.com/users/Yenthe666/gists{/gist_id}","starred_url":"https://api.github.com/users/Yenthe666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yenthe666/subscriptions","organizations_url":"https://api.github.com/users/Yenthe666/orgs","repos_url":"https://api.github.com/users/Yenthe666/repos","events_url":"https://api.github.com/users/Yenthe666/events{/privacy}","received_events_url":"https://api.github.com/users/Yenthe666/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T16:11:51Z","updated_at":"2018-03-22T16:11:51Z","author_association":"CONTRIBUTOR","body":"Hi @boumboum,\r\n\r\nI've just did this and it works fine. Have a look at my example record and see the downloaded file at the bottom of my browser:\r\n![image](https://user-images.githubusercontent.com/6352350/37782761-0440195a-2df4-11e8-84a5-c2548f2dafe9.png)\r\nWhen I open the PDF:\r\n![image](https://user-images.githubusercontent.com/6352350/37782777-0dd31bc0-2df4-11e8-9402-cd928a604306.png)\r\n\r\nSo everything seems to be working fine here. But that is on a Linux, so I'd have to double check on a Windows. Will reopen for now."}}
{"actor":{"display_login":"Yenthe666"}}