[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 6f95be6884 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) <las@odoo.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user