Skip to content

[FIX] server_environment: prevent import errors for test classes - #298

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
camptocamp:18-fix-import-error-on-other-repos
Sep 8, 2026
Merged

[FIX] server_environment: prevent import errors for test classes#298
OCA-git-bot merged 1 commit into
OCA:18.0from
camptocamp:18-fix-import-error-on-other-repos

Conversation

@simahawk

@simahawk simahawk commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Test suites in other repositories are failing when they don't rely already on odoo-test-helper. Example:

File /__w/edi/edi/account_invoice_export_server_env/tests/init.py, line 1, in
from . import test_transmit_method
File /__w/edi/edi/account_invoice_export_server_env/tests/test_transmit_method.py, line 8, in
from odoo.addons.server_environment.tests.common import ServerEnvironmentCase
File /opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/server_environment/tests/init.py, line 3, in
from . import test_preserve_not_env_managed_data
File /opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/server_environment/tests/test_preserve_not_env_managed_data.py, line 4, in
from odoo_test_helper import FakeModelLoader
ModuleNotFoundError: No module named 'odoo_test_helper'

Test suites in other repositories are failing when they don't rely already on odoo-test-helper. Example:

File /__w/edi/edi/account_invoice_export_server_env/tests/__init__.py, line 1, in <module>
    from . import test_transmit_method
  File /__w/edi/edi/account_invoice_export_server_env/tests/test_transmit_method.py, line 8, in <module>
    from odoo.addons.server_environment.tests.common import ServerEnvironmentCase
  File /opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/server_environment/tests/__init__.py, line 3, in <module>
    from . import test_preserve_not_env_managed_data
  File /opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/server_environment/tests/test_preserve_not_env_managed_data.py, line 4, in <module>
    from odoo_test_helper import FakeModelLoader
ModuleNotFoundError: No module named 'odoo_test_helper'
@simahawk

simahawk commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

CC @yankinmax

@simahawk

simahawk commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Fast tracking as it breaks many other repos

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-298-by-simahawk-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 535526f into OCA:18.0 Sep 8, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 01e7d35. Thanks a lot for contributing to OCA. ❤️

@yankinmax

Copy link
Copy Markdown
Contributor

CC @yankinmax

I've handled that in mine PR's 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants