diff options
| author | Adrien Widart <awt@odoo.com> | 2021-05-04 14:51:12 +0000 |
|---|---|---|
| committer | Adrien Widart <awt@odoo.com> | 2021-05-31 07:21:02 +0000 |
| commit | e6c69a8cf00cd858a45ebf321a190666322c0897 (patch) | |
| tree | 1655dcd9a1ffe86dfe6df832cb70280d021afa00 /addons/web/static/src/js/views/renderer_wrapper.js | |
| parent | 9cdde27e25b13714e24082a50673454693c954ef (diff) | |
[FIX] account, mail: link attachments to invoice
When using the "Send & Print" functionality, if the user adds an
attachment, the latter won't be linked to the record.
To reproduce the error:
1. Open a posted invoice
2. Send & Print
3. Attach a file > Select a file on your device
4. Send the email
Error: The invoice's PDF is added to record's attachments, but not the
other file (from step 3).
When the module selects the attachments that need to be linked to the
invoice, it only keeps the ones currently linked to `mail.compose.message`:
https://github.com/odoo/odoo/blob/6441ab71cb68648aa735057952bf757677a20ee3/addons/mail/models/mail_thread.py#L1719-L1725
This is correct when the user creates a message directly in the chatter.
However, when the mail is created thanks to `Send & Print` functionality,
the attachment is linked to `account.invoice.send`.
Another flow have a similar issue: from invoices list, select few ones,
Action > Send & Print: the generated PDF won't be attached to their
invoice. In such a situation, here is the source of the problem:
https://github.com/odoo/odoo/blob/05ad6c477f7da2a495e5baf5b4629323b9d11fa0/addons/mail/wizard/mail_compose_message.py#L363-L367
There isn't any information about the invoice, therefore it is not
possible to linked the attachment to it.
OPW-2438457
closes odoo/odoo#71425
X-original-commit: e87f599d4eb22250b628d650b9f59b54db8d043c
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/views/renderer_wrapper.js')
0 files changed, 0 insertions, 0 deletions
