Monday, February 17, 2025
1 change · saas-18.1
Resolved issues and error corrections
This fixes an error that occurred when users tried to add a new attachment while sending an invoice. The attachment selector is now aligned with the updated mail component, so invoice sending workflows can proceed without a traceback.
Original PR description
### Steps to reproduce: - Go to an invoice - Click "Send" - Try to add a new attachment - Traceback ### Cause: The template of `mail_attachments_selector` is a template from the module `mail`. In this [commit](https://github.com/odoo/odoo/commit/fbc21577c01b07d677b5f6d2784f42d3b3caf84e#diff-20933689544fe18977505a4bcd6222eacd92376dea482d9e3246b9a0c41d5fdd) the template was changed to use the component `FileHandler` instead of `FileInput` and the corresponding `onFileUploaded` was changed but not the one from the `account` module. This method was receiving objects but expected a list which explains the error. ### Solution: Update the function to mirror the [one](https://github.com/odoo/odoo/blob/5d67ca906bfd1f25f7c831a7fcc6359cfaa7a9a6/addons/mail/static/src/core/web/mail_composer_attachment_selector.js#L24-L35) from the component's JS file. opw-4559421