Skip to content
Snippets Groups Projects
Commit a6447663 authored by Louis Baudoux's avatar Louis Baudoux
Browse files

[FIX] account: fix main_attachment_id not set on attachment upload


When creating invoices via the 'Upload' button, the
'message_main_attachment_id' field wasn't set on the record. This
happened because the message posted in the chatter was linked to the
wrong 'res_model' which prevented it from being selected as the main
attachment.

This was causing a bug in the OCR module ('account.invoice.extract')
where we use this field to determine which attachment must be sent to
the OCR server.

closes odoo/odoo#36309

Signed-off-by: default avatarFlorian Daloze (fda) <fda@odoo.com>
parent 93fa2830
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment