2026-02-20 04:09:30,013 329 ERROR odoo odoo.addons.base_multi_company.tests.test_multi_company_abstract: FAIL: TestMultiCompanyAbstract.test_set_company_id
2026-02-20T04:10:05.2288507Z Traceback (most recent call last):
2026-02-20T04:10:05.2288839Z File "/opt/odoo-venv/bin/coverage", line 6, in <module>
2026-02-20T04:10:05.2289105Z sys.exit(main())
2026-02-20T04:10:05.2289443Z File "/opt/odoo-venv/lib/python3.10/site-packages/coverage/cmdline.py", line 1163, in main
2026-02-20T04:10:05.2289864Z status = CoverageScript().command_line(argv)
2026-02-20T04:10:05.2290297Z File "/opt/odoo-venv/lib/python3.10/site-packages/coverage/cmdline.py", line 853, in command_line
2026-02-20T04:10:05.2290733Z return self.do_run(options, args)
2026-02-20T04:10:05.2291110Z File "/opt/odoo-venv/lib/python3.10/site-packages/coverage/cmdline.py", line 1042, in do_run
2026-02-20T04:10:05.2291498Z runner.run()
2026-02-20T04:10:05.2291970Z File "/opt/odoo-venv/lib/python3.10/site-packages/coverage/execfile.py", line 213, in run
2026-02-20T04:10:05.2292373Z exec(code, main_mod.__dict__)
2026-02-20T04:10:05.2292622Z File "/opt/odoo-venv/bin/odoo", line 8, in <module>
2026-02-20T04:10:05.2292878Z odoo.cli.main()
2026-02-20T04:10:05.2293101Z File "/opt/odoo/odoo/cli/command.py", line 76, in main
2026-02-20T04:10:05.2293354Z o.run(args)
2026-02-20T04:10:05.2293560Z File "/opt/odoo/odoo/cli/server.py", line 182, in run
2026-02-20T04:10:05.2293809Z main(args)
2026-02-20T04:10:05.2294017Z File "/opt/odoo/odoo/cli/server.py", line 175, in main
2026-02-20T04:10:05.2294353Z rc = odoo.service.server.start(preload=preload, stop=stop)
2026-02-20T04:10:05.2294801Z File "/opt/odoo/odoo/service/server.py", line 1462, in start
2026-02-20T04:10:05.2295101Z rc = server.run(preload, stop)
2026-02-20T04:10:05.2295370Z File "/opt/odoo/odoo/service/server.py", line 627, in run
2026-02-20T04:10:05.2295659Z rc = preload_registries(preload)
2026-02-20T04:10:05.2295984Z File "/opt/odoo/odoo/service/server.py", line 1366, in preload_registries
2026-02-20T04:10:05.2296395Z registry = Registry.new(dbname, update_module=update_module)
2026-02-20T04:10:05.2296713Z File "<decorator-gen-13>", line 2, in new
2026-02-20T04:10:05.2297001Z File "/opt/odoo/odoo/tools/func.py", line 97, in locked
2026-02-20T04:10:05.2297273Z return func(inst, *args, **kwargs)
2026-02-20T04:10:05.2297557Z File "/opt/odoo/odoo/modules/registry.py", line 129, in new
2026-02-20T04:10:05.2297942Z odoo.modules.load_modules(registry, force_demo, status, update_module)
2026-02-20T04:10:05.2298348Z File "/opt/odoo/odoo/modules/loading.py", line 489, in load_modules
2026-02-20T04:10:05.2298769Z processed_modules += load_marked_modules(env, graph,
2026-02-20T04:10:05.2299140Z File "/opt/odoo/odoo/modules/loading.py", line 365, in load_marked_modules
2026-02-20T04:10:05.2299493Z loaded, processed = load_module_graph(
2026-02-20T04:10:05.2299820Z File "/opt/odoo/odoo/modules/loading.py", line 284, in load_module_graph
2026-02-20T04:10:05.2300214Z test_results = loader.run_suite(suite, global_report=report)
2026-02-20T04:10:05.2300572Z File "/opt/odoo/odoo/tests/loader.py", line 118, in run_suite
2026-02-20T04:10:05.2300936Z suite(results)
2026-02-20T04:10:05.2301321Z AssertionError: Found unexpected attributes on multi.company.abstract.tester: company_ids company_id
Module
base_multi_company
Describe the bug
Since odoo/odoo@de056cc a new checker for methods being set on models during tests has been introduced
As
base_multi_companyis using a fake class in tests, the following error is raised for the 8 tests of the module :This was encountered in #954 and #955
To Reproduce
Affected versions: 18.0
Steps to reproduce the behavior: