summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorNasreddin (bon) <bon@odoo.com>2021-01-06 14:31:09 +0000
committerBenjamin Frantzen (bfr) <bfr@odoo.com>2021-02-15 14:03:20 +0000
commit0f6ad2a690f76d6bbbe92106fc8360f99eaac6c2 (patch)
tree0814b7ee4ae155e7f8b7358913535167d3d06944 /addons/web/static/src/js
parent04424cddf1e28a52fd7df3ad954d2d484b52972e (diff)
[FIX] account_facturx: Parse pdf attachment
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#64286 X-original-commit: 9076b1ba0b7279a9da45f4e52d5203ad7b5710a0 Signed-off-by: bon-odoo <nboulif@users.noreply.github.com> Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions