5504c3f98307ce113a27d38d9b7e955325a6cdf3
Before this commit, the tour test_image_upload_progress was failing inconsistently at the step "check that the file was correctly uploaded" during the upload of a single image. [1] adapted the upload progress toast to owl, but it used a state variable isVisible, updated with a useEffect hook called on change of the file props. This was not optimal: the visibility could be updated directly through a reactive variable from the upload service. Instead of automanaging its visibility, the component is completely driven by the upload service. This small optimization is useful in regards of the implementation of the TourService. As it is implemented now, the TourService works this way: When it completed a step, it will check for the tooltip of the next step, in the next javascript call stack. If it does not find it in the DOM at that time, it will listen to the mutations and wait for 750ms after the last one to check again. Here, as the progress toast was rendered visible not directly when uploading a file, but after another render, after the useEffect was executed, the progress toast was sometimes not found directly after playing the step sending the 'change' event. Then, the TourService was waiting for all the mutations to execute (the progress toast appears, the media dialog closes itself, the toast hides itself) and check again after a delay. But by then the toast was already hidden. With that, the tour steps are rewritten to follow the flow: - Open the media dialog in single upload mode - Upload an image - The toast is shown - The media dialog is closed - The toast with "The file has been uploaded" is still there - The toast autohides Also, the file input value is reset after uploading files, otherwise it was not possible to upload the same file twice (the 'change' event was not triggered). [1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b runbot-4117 closes odoo/odoo#95890 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%