Trust-Code / odoo-brasil

Versão 16 - Odoo Brasil
http://www.trustcode.com.br/
MIT License
189 stars 178 forks source link

Erro Impressão de Danfe #1200

Closed GuilhermeKimoto closed 2 years ago

GuilhermeKimoto commented 2 years ago

Olá, estou enfrentando o seguinte erro ao tentar imprimir a Danfe!

Como posso resolver? image

Traceback: image

Traceback (most recent call last): File "/usr/lib/python3.8/base64.py", line 510, in _input_type_check m = memoryview(s) TypeError: memoryview: a bytes-like object is required, not 'bool'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/usr/lib/python3/dist-packages/odoo/http.py", line 808, in dispatch r = self._call_function(self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 361, in _call_function return checked_call(self.db, *args, *kwargs) File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper return f(dbname, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/http.py", line 349, in checked_call result = self.endpoint(*a, kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 914, in call return self.method(*args, *kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 533, in response_wrap response = f(args, kw) File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 2063, in report_routes pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0] File "/mnt/extras_addons/odoo-brasil/l10n_br_eletronic_document/reports/danfe_report.py", line 32, in _render_qweb_pdf nfe_xml = base64.decodestring(nfe.nfe_processada or nfe.xml_to_send) File "/usr/lib/python3.8/base64.py", line 554, in decodestring return decodebytes(s) File "/usr/lib/python3.8/base64.py", line 545, in decodebytes _input_type_check(s) File "/usr/lib/python3.8/base64.py", line 513, in _input_type_check raise TypeError(msg) from err Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/usr/lib/python3/dist-packages/odoo/http.py", line 808, in dispatch r = self._call_function(self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 361, in _call_function return checked_call(self.db, *args, *kwargs) File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper return f(dbname, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/http.py", line 349, in checked_call result = self.endpoint(*a, kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 914, in call return self.method(*args, *kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 533, in response_wrap response = f(args, kw) File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 2063, in report_routes pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0] File "/mnt/extras_addons/odoo-brasil/l10n_br_eletronic_document/reports/danfe_report.py", line 32, in _render_qweb_pdf nfe_xml = base64.decodestring(nfe.nfe_processada or nfe.xml_to_send) File "/usr/lib/python3.8/base64.py", line 554, in decodestring return decodebytes(s) File "/usr/lib/python3.8/base64.py", line 545, in decodebytes _input_type_check(s) File "/usr/lib/python3.8/base64.py", line 513, in _input_type_check raise TypeError(msg) from err TypeError: expected bytes-like object, not bool