Saturday, August 9, 2025
2 changes · saas-18.2
Resolved issues and error corrections
This update adjusts internal file type tests so they pass consistently whether an optional detection library is installed or not. It helps keep maintenance and upgrade checks stable across different environments without changing user-facing behavior.
Original PR description
Those tests are failing when python-magic is installed. Since 26f9c82b99 Odoo > saas-18.4 has this lib as a requirement and comes with appropriate fixes. This commit adapts some test for versions prior to saas-18.4 to also work when the python-magic lib is installed. Forward-Port-Of: odoo/odoo#221408 Forward-Port-Of: odoo/odoo#221045
This fix updates an internal account import test to use the correct spreadsheet file type. It helps ensure the import feature is tested consistently across environments, reducing false test failures without changing user-facing behavior.
Original PR description
[FIX] account_base_import: fix mime type The `test_duplicate_journals_import` test fails when the magic lib is present. While the `xlsx` detection is supported, the test calls the import wizard with `xlsx` files but `application/vnd.ms-excel` as the file type which is for `xls` files. With this commit, the appropriate file type is given and the test works in all cases. (tested with Docker16, PureNoble and PureBookworm docker files) Forward-Port-Of: odoo/enterprise#91450 Forward-Port-Of: odoo/enterprise#91267