From c81e89adf76c7ef1d980e07bdb6a38e23fa885fc Mon Sep 17 00:00:00 2001 From: "Dylan Kiss (dyki)" Date: Thu, 7 Sep 2023 13:58:50 +0200 Subject: [PATCH] [FIX] account: fix drag and drop on journals When trying to drop an invoice on a journal on the journal dashboard, it fails with a message "Could not upload files". The issue is that commit 6f95be6884a59665ca7d8a809e7aaa17695fa9b0 changed a CSS class where the upload functionality depended on, making it fail. This commit fixes this issue by adapting the CSS selector of the upload field. task-3496997 closes odoo/odoo#134965 Signed-off-by: Laurent Smet (las) --- .../account/static/src/components/bills_upload/bills_upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/static/src/components/bills_upload/bills_upload.js b/addons/account/static/src/components/bills_upload/bills_upload.js index 9b7fd07fd3a..97449736ea6 100644 --- a/addons/account/static/src/components/bills_upload/bills_upload.js +++ b/addons/account/static/src/components/bills_upload/bills_upload.js @@ -96,7 +96,7 @@ export class AccountDropZone extends Component { } onDrop(ev) { - const selector = '.account_file_uploader.o_input_file.o_hidden'; + const selector = '.account_file_uploader.o_input_file'; // look for the closest uploader Input as it may have a context let uploadInput = ev.target.closest('.o_drop_area').parentElement.querySelector(selector) || document.querySelector(selector); let files = ev.dataTransfer ? ev.dataTransfer.files : false;