Skip to Content
Menu
This question has been flagged
1 Reply
1807 Views

I am getting this error while I ran the test. I have created a test file and __init__.py file in the tests directory and also included the test file in the __manifest_.py file and I ran a command 

./odoo-bin -i <module name> --test-enable -d <database name> --stop-after-init --addons-path

then i am getting this error.

CRITICAL odoo14 odoo. service.server: Failed to initialize database `odoo14`. 

Traceback (most recent call last):

  File "/opt/odoo/odoo14/odoo/service/server.py", line 1198, in preload_registries

    registry = Registry.new(dbname, update_module=update_module)

  File "/opt/odoo/odoo14/odoo/modules/registry.py", line 89, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/opt/odoo/odoo14/odoo/modules/loading.py", line 449, in load_modules

    processed_modules += load_marked_modules(cr, graph,

  File "/opt/odoo/odoo14/odoo/modules/loading.py", line 346, in load_marked_modules

    loaded, processed = load_module_graph(

  File "/opt/odoo/odoo14/odoo/modules/loading.py", line 221, in load_module_graph

    load_data(cr, idref, mode, kind='data', package=package)

  File "/opt/odoo/odoo14/odoo/modules/loading.py", line 69, in load_data

    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)

  File "/opt/odoo/odoo14/odoo/tools/convert.py", line 737, in convert_file

    raise ValueError("Can't load unknown file type %s.", filename)

ValueError: ("Can't load unknown file type %s.

Avatar
Discard
Best Answer

Hello Sirisha,

You don't need to call the test cases to file in init or manifest file. You just need to add the test cases file in the tests folder's init file i.e tests/__init__.py

For, More information please follow this document link at https://www.odoo.com/documentation/14.0/reference/testing.html

Thank you!

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

Avatar
Discard