Skip to content

Commit 68ab355

Browse files
authored
Merge pull request #87 from yvaucher/18-current_test
Compatibility with Odoo 18: Set odoo.modules.module.current_test
2 parents e13b04f + 76c36a7 commit 68ab355

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pytest_odoo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ def pytest_cmdline_main(config):
9696
# Restore the default one.
9797
signal.signal(signal.SIGINT, signal.default_int_handler)
9898

99+
if odoo.release.version_info >= (18,):
100+
odoo.modules.module.current_test = True
101+
99102
if odoo.release.version_info < (15,):
100103
# Refactor in Odoo 15, not needed anymore
101104
with odoo.api.Environment.manage():

0 commit comments

Comments
 (0)