简体   繁体   中英

odoo PyCharm configuration / no module named 'odoo'

I'm newbee in programming and I need some help.

I have to work with PyCharm and Odoo, so my point is to configure PyCharm for Odoo debugging. First of all I made a module and a model, it perfectly work with database(i can see and check it). I want PyCharm not to highlight word 'odoo', 'models' and 'fields' by red line(unresolved reference) or green line(Package containing module 'odoo' is not listed in project requirements)

I've read lots of tutorials and manuals but nothing helps me. I think the problem is that PyCharm doesn't see the odoo package (or smth like that). There is no odoo in requirements.txt

So, I need to coonect PyCharm and Odoo, without red or green underlining. PyCharm doesn't see the Odoo module. Maybe the problem with the fact that my project folder located not in odoo main folder, but maybe im wrong. Sorry for my english.

Install and create virtualenv and install odoo. Then add virtualenv path to pycharm.

SOLVED: You just need to add odoo folder to the source folder of the project in PyCharm settings: File - Settings - Project Structure - + Add content root There you should pick Odoo13\server folder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM