Files
odoo_source/addons/test_mail
Yolann Sabaux 71ed187223 [FIX] account: display pdf attachment
Steps to reproduce:
- Install l10n_mx modules
- Switch to MX company
- Create invoice and confirm it
- Send it to PAC in test environment (Process Now button)
- Click Send & Print button

Issue:
- XML Preview does not display, only shows the file name in the top right corner of the chatter.

Cause:
In l10n_mx_edi, when posting the invoice, the only attachment available is the xml sent to the government in `_message_set_main_attachment_id`.
Therefore the xml is set as the main attachment.
When clicking on "Send and Print", the pdf is generated but the main attachment is still the xml

Solution:
Redefine the main attachment everytime the the main attachment is an xml

Note:
- octet-stream have also been filtered out

opw-3085934

closes odoo/odoo#116784

X-original-commit: 48e6e81a47f5371f5985d135e56f39f445eb2854
Related: odoo/enterprise#38861
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-28 13:43:57 +02:00
..