if you try to create an elettronic invice from the wizard, and you chose to also attach the pdf of the invoice you got the following error:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/media/OneTDisk/workspace/v16/odoo/addons/account/models/ir_actions_report.py", line 52, in _render_qweb_pdf
if self._get_report(report_ref).report_name in ('account.report_invoice_with_payments', 'account.report_invoice'):
File "/media/OneTDisk/workspace/v16/odoo/odoo/addons/base/models/ir_actions_report.py", line 513, in _get_report
report = self.env.ref(report_ref)
File "/media/OneTDisk/workspace/v16/odoo/odoo/api.py", line 582, in ref
res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
File "/media/OneTDisk/workspace/v16/odoo/odoo/addons/base/models/ir_model.py", line 2002, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)[1:3]
File "", line 2, in _xmlid_lookup
File "/media/OneTDisk/workspace/v16/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/media/OneTDisk/workspace/v16/odoo/odoo/addons/base/models/ir_model.py", line 1990, in _xmlid_lookup
module, name = xmlid.split('.', 1)
ValueError: not enough values to unpack (expected 2, got 1)
this code seems wrong:
attachment, attachment_type = report_model._render_qweb_pdf(inv.ids)
the function definition is
def _render_qweb_pdf(self, report_ref, res_ids=None, data=None):
so the code will fail
if you try to create an elettronic invice from the wizard, and you chose to also attach the pdf of the invoice you got the following error: During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File "/media/OneTDisk/workspace/v16/odoo/addons/account/models/ir_actions_report.py", line 52, in _render_qweb_pdf
if self._get_report(report_ref).report_name in ('account.report_invoice_with_payments', 'account.report_invoice'):
File "/media/OneTDisk/workspace/v16/odoo/odoo/addons/base/models/ir_actions_report.py", line 513, in _get_report
report = self.env.ref(report_ref)
File "/media/OneTDisk/workspace/v16/odoo/odoo/api.py", line 582, in ref
res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
File "/media/OneTDisk/workspace/v16/odoo/odoo/addons/base/models/ir_model.py", line 2002, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)[1:3]
File "", line 2, in _xmlid_lookup
File "/media/OneTDisk/workspace/v16/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/media/OneTDisk/workspace/v16/odoo/odoo/addons/base/models/ir_model.py", line 1990, in _xmlid_lookup
module, name = xmlid.split('.', 1)
ValueError: not enough values to unpack (expected 2, got 1)
in https://github.com/OCA/l10n-italy/blob/3dd5249e119312430f511570b7754e81dd54b918/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py#L296
this code seems wrong:
attachment, attachment_type = report_model._render_qweb_pdf(inv.ids)
the function definition isdef _render_qweb_pdf(self, report_ref, res_ids=None, data=None):
so the code will fail