Skip to content
Snippets Groups Projects
Commit 377e8eed authored by Andrea Grazioso (agr-odoo)'s avatar Andrea Grazioso (agr-odoo)
Browse files

[FIX] l10n_it_edi: attachments from xml missing res_model/res_id


Install Documents
Open Settings > Documents, enable 'Accounting' files centralization
Configure 'Journals' with a single line
- Journal -> Vendor Bills
- Workspace -> Finance / Supplier Invoices
Now in go to Accounting>Vendor>Bills
Upload an xml representing a vendor bill, including an attachment
encoded in the <Allegati> tag
Open created bill

Traceback. The error is caused by the attachment included in the xml
registered without res_id/res_model.
In the document flow the attachment will receive a res_id, but not the
res_model, causing the traceback when retrieving the attachment

opw-2919610

closes odoo/odoo#97061

Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
parent 94ffec7b
No related branches found
No related tags found
No related merge requests found
......@@ -723,6 +723,8 @@ class AccountEdiFormat(models.Model):
'name': name_attachment,
'datas': attachment_64,
'type': 'binary',
'res_model': 'account.move',
'res_id': new_invoice.id,
})
# default_res_id is had to context to avoid facturx to import his content
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment