Friday, December 23, 2022
1 change · master
Code cleanup and technical improvements
The data import screen has been rebuilt with Odoo’s newer interface technology, replacing older legacy code and libraries. This should make imports easier to maintain, improve consistency with the rest of Odoo, and support better loading feedback for users.
Original PR description
This PR adds a Select component that has been used here to replace the jquery select2. Other components and hooks have been used or modified to bring this action to a better state, such as the UI…
This PR adds a Select component that has been used here to replace the jquery select2. Other components and hooks have been used or modified to bring this action to a better state, such as the UI service and BlockUI component, to support custom messages and the use of components. It was required to reimplement the loading progress and indicator used by the view. The main goal of this PR is to reimplements the import action view to use Owl instead of legacy code + library. Different components have been created to separate the UI in smaller blocks, and a model file contains the main aspects of the import logic. The set_file route in the base_import controller has been adapted to remove the usage of jsonp type of code for this situation since it is no longer needed nowadays. On top of the rewrite, js tests have been added to make sure the feature behaves correctly, and to assert the intended specs. Finally, legacy files + library have been removed, since they are no longer required. This work has been done by @BastienFafchamps and myself task-3092474