[FIX] base_import_module: extract only used files and thread-safe
For performance reasons, instead of extracting the whole
zip, extract only the files which are actually used
during in the `_import_module`, in case people
put additional crap in the archive which are ignored
during the import. That way, we avoid useless I/O.
Also, adding the temporary directory in the addons
path wasn't thread-safe.
This revision changes this to make the module
import feature thread-safe.
closes odoo/odoo#80120
Signed-off-by:
Pierre Masereel <pim@odoo.com>
Showing
- addons/base_import_module/models/ir_module.py 56 additions, 11 deletionsaddons/base_import_module/models/ir_module.py
- addons/base_import_module/tests/__init__.py 1 addition, 0 deletionsaddons/base_import_module/tests/__init__.py
- addons/base_import_module/tests/test_import_module.py 188 additions, 0 deletionsaddons/base_import_module/tests/test_import_module.py
Please register or sign in to comment