[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#97277 X-original-commit: 377e8eedb2ceb444d6b331debdffa17c47e4a898 Signed-off-by: Josse Colpaert <jco@odoo.com> Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
This commit is contained in:
@@ -737,6 +737,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
|
||||
|
||||
Reference in New Issue
Block a user