Erro ao enviar NFe por email
Closed this issue · 0 comments
Eu estou obtendo esse erro ao tentar enviar NFe via email.
2020-12-01 10:48:09,973 360 ERROR bugfree_v11 odoo.addons.base.ir.ir_cron: Call from cron Enviar NFe por Email for server action #770 failed in Job #21
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 484, in readFromStream
return NameObject(name.decode('utf-8'))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 16: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\safe_eval.py", line 350, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "", line 1, in
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_account_einvoice\models\invoice_eletronic.py", line 549, in send_email_nfe_queue
nfe.send_email_nfe()
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_account_einvoice\models\invoice_eletronic.py", line 539, in send_email_nfe
mail.id, attachment_ids=[(6, 0, atts + mail.attachment_ids.ids)])
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mass_mailing\models\mail_thread.py", line 61, in message_post_with_template
return super(MailThread, no_massmail).message_post_with_template(template_id, **kwargs)
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mail\models\mail_thread.py", line 2004, in message_post_with_template
update_values = composer.onchange_template_id(template_id, kwargs['composition_mode'], self._name, res_id)['value']
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mail\wizard\mail_compose_message.py", line 365, in onchange_template_id
values = self.generate_email_for_composer(template_id, [res_id])[res_id]
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mail\wizard\mail_compose_message.py", line 503, in generate_email_for_composer
template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields=fields)
File "o:\odoo 11.0_dados\addons\11.0\mail_debrand\models\mail_template.py", line 20, in generate_email
return super(MailTemplate, obj).generate_email(res_ids, fields=fields)
File "o:\odoo 11.0_dados\addons\11.0\email_template_qweb\models\mail_template.py", line 26, in generate_email
res_ids, fields=fields
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mail\models\mail_template.py", line 512, in generate_email
result, format = report.render_qweb_pdf([res_id])
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_nfe\reports\danfe_report.py", line 33, in render_qweb_pdf
res_ids, data=data)
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_boleto\reports\boleto.py", line 21, in render_qweb_pdf
res_ids, data=data)
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_boleto\reports\report.py", line 23, in render_qweb_pdf
res_ids, data=data)
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\base\ir\ir_actions_report.py", line 667, in render_qweb_pdf
return self._post_pdf(save_in_attachment, pdf_content=pdf_content, res_ids=html_ids), 'pdf'
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\base\ir\ir_actions_report.py", line 577, in _post_pdf
writer.write(result_stream)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 482, in write
self._sweepIndirectReferences(externalReferenceMap, self._root)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 571, in _sweepIndirectReferences
self._sweepIndirectReferences(externMap, realdata)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 571, in _sweepIndirectReferences
self._sweepIndirectReferences(externMap, realdata)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 556, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, data[i])
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 571, in _sweepIndirectReferences
self._sweepIndirectReferences(externMap, realdata)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 586, in _sweepIndirectReferences
newobj = self._sweepIndirectReferences(externMap, newobj)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 577, in _sweepIndirectReferences
newobj = data.pdf.getObject(data)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 1611, in getObject
retval = readObject(self.stream, self)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 66, in readObject
return DictionaryObject.readFromStream(stream, pdf)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 579, in readFromStream
value = readObject(stream, pdf)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 60, in readObject
return NameObject.readFromStream(stream, pdf)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 492, in readFromStream
raise utils.PdfReadError("Illegal character in Name Object")
PyPDF2.utils.PdfReadError: Illegal character in Name Object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\base\ir\ir_cron.py", line 109, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\base\ir\ir_actions.py", line 557, in run
res = func(action, eval_context=eval_context)
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\website\models\ir_actions.py", line 57, in run_action_code_multi
res = super(ServerAction, self).run_action_code_multi(action, eval_context)
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\base\ir\ir_actions.py", line 433, in run_action_code_multi
safe_eval(action.sudo().code.strip(), eval_context, mode="exec", nocopy=True) # nocopy allows to return 'action'
File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\safe_eval.py", line 373, in safe_eval
pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])
File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\safe_eval.py", line 350, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "", line 1, in
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_account_einvoice\models\invoice_eletronic.py", line 549, in send_email_nfe_queue
nfe.send_email_nfe()
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_account_einvoice\models\invoice_eletronic.py", line 539, in send_email_nfe
mail.id, attachment_ids=[(6, 0, atts + mail.attachment_ids.ids)])
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mass_mailing\models\mail_thread.py", line 61, in message_post_with_template
return super(MailThread, no_massmail).message_post_with_template(template_id, **kwargs)
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mail\models\mail_thread.py", line 2004, in message_post_with_template
update_values = composer.onchange_template_id(template_id, kwargs['composition_mode'], self._name, res_id)['value']
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mail\wizard\mail_compose_message.py", line 365, in onchange_template_id
values = self.generate_email_for_composer(template_id, [res_id])[res_id]
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mail\wizard\mail_compose_message.py", line 503, in generate_email_for_composer
template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields=fields)
File "o:\odoo 11.0_dados\addons\11.0\mail_debrand\models\mail_template.py", line 20, in generate_email
return super(MailTemplate, obj).generate_email(res_ids, fields=fields)
File "o:\odoo 11.0_dados\addons\11.0\email_template_qweb\models\mail_template.py", line 26, in generate_email
res_ids, fields=fields
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\mail\models\mail_template.py", line 512, in generate_email
result, format = report.render_qweb_pdf([res_id])
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_nfe\reports\danfe_report.py", line 33, in render_qweb_pdf
res_ids, data=data)
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_boleto\reports\boleto.py", line 21, in render_qweb_pdf
res_ids, data=data)
File "o:\odoo 11.0_dados\addons\odoo-brasil-11.0\br_boleto\reports\report.py", line 23, in render_qweb_pdf
res_ids, data=data)
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\base\ir\ir_actions_report.py", line 667, in render_qweb_pdf
return self._post_pdf(save_in_attachment, pdf_content=pdf_content, res_ids=html_ids), 'pdf'
File "c:\program files (x86)\odoo 11.0\server\odoo\addons\base\ir\ir_actions_report.py", line 577, in _post_pdf
writer.write(result_stream)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 482, in write
self._sweepIndirectReferences(externalReferenceMap, self._root)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 571, in _sweepIndirectReferences
self._sweepIndirectReferences(externMap, realdata)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 571, in _sweepIndirectReferences
self._sweepIndirectReferences(externMap, realdata)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 556, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, data[i])
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 571, in _sweepIndirectReferences
self._sweepIndirectReferences(externMap, realdata)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 586, in _sweepIndirectReferences
newobj = self._sweepIndirectReferences(externMap, newobj)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 547, in _sweepIndirectReferences
value = self._sweepIndirectReferences(externMap, value)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 577, in _sweepIndirectReferences
newobj = data.pdf.getObject(data)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\pdf.py", line 1611, in getObject
retval = readObject(self.stream, self)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 66, in readObject
return DictionaryObject.readFromStream(stream, pdf)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 579, in readFromStream
value = readObject(stream, pdf)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 60, in readObject
return NameObject.readFromStream(stream, pdf)
File "C:\Program Files (x86)\Odoo 11.0\python\lib\site-packages\PyPDF2\generic.py", line 492, in readFromStream
raise utils.PdfReadError("Illegal character in Name Object")
ValueError: <class 'PyPDF2.utils.PdfReadError'>: "Illegal character in Name Object" while evaluating
'model.send_email_nfe_queue()'