f234b4fba40d3c0d7e5b4828dbbd033f6a667ea2
Solution is different in the case of the foward-port, see bellow.
Issue
- Init an instances of Odoo v13.0 'A' and v14.0 'B'.
- Install "Accounting" app on instance A & B.
- Set your email server on instance A & B.
- Activate 'External email server' in settings of instance A.
- Set an email alias for "Vendor Bills" on instance A.
- Send a "Customer Invoice" from instance B to alias of instance A.
- Fetch for new mail (in case new vendor bill don't appear) on instance A.
- Open the new Vendor bill on instance A.
Data are not parsed from pdf attachment.
Cause
No managing all attachements types:
- list(tuple(str,str), tuple(str,str, dict) or int) attachments : list of attachment tuples in the form
``(name,content)`` or ``(name,content, info)``, where content is NOT base64 encoded
- list id attachment_ids: list of existing attachement to link to this message
- Should only be setted by chatter
- Attachement object attached to mail.compose.message(0) will be attached
to the related document.
Solution
In this fw-port, we override `_message_post_after_hook` instead of
`_message_post_process_attachments` because the later is also called
from portal and with sudo rights. We don't want to update invoices with
files coming from portal, since it could cause a security issue.
Also, because of the way attachments are parsed for invoice, this could
cause the OCR not to work any longer because at the time
`_message_post_process_attachments` is called,`move.message_main_attachment_id`
is not set yet, and OCR relies on it.
The solution is rather to override `_message_post_after_hook` because
it ensures that all the attachments have been properly treated and are
present in `new_message.attachment_ids`, and `message_main_attachment_id`
is properly set.
opw-2411002
closes odoo/odoo#66458
X-original-commit: 0f6ad2a690f76d6bbbe92106fc8360f99eaac6c2
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%