ahmed dinar
ahmed dinar

Reputation: 3

odoo import models, fields, api ModuleNotFoundError: No module named 'odoo'

I am new with working in odoo 11.0 and when i run my file hos.py this error will pop out (from odoo import models, fields, api, : ModuleNotFoundError: No module named 'odoo' ). enter image description here

Upvotes: 0

Views: 2248

Answers (2)

Kayemba Luwaga
Kayemba Luwaga

Reputation: 47

Look at all your initialization init.py files, change

import [module_name]

to

from . import [module_name]

Upvotes: 0

bigbear3001
bigbear3001

Reputation: 544

For developing your own odoo modules/modules you need to start odoo-bin to test them: odoo-bin You can find odoo-bin in the odoo project https://github.com/odoo/odoo/tree/11.0

Also if you are developing your own modules you need to add the modules/addons directory to the odoo.conf.

Odoo Modules are usually not executable outside of an odoo instance.

Have a look at the developer documentation for 11.0 here: https://www.odoo.com/documentation/11.0/howtos/backend.html

Upvotes: 1

Related Questions