Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Why do I get ImportError: No module named http ?
When installing my module I get the following error:
File "/home/michael/workspace/openerp/server/openerp/addons/my_punchcard/controllers/my_controller.py, line 1, in <module> import openerp.http as http ImportError: No module named httpHere's line 1 of my code:
import openerp.http as http
so I tried this instead:
import openerp.addons.web.http as http
but then I get this error which says it can't find the route attribute.
File "/home/michael/workspace/openerp/server/openerp/addons/my_punchcard/controllers/my_controller.py", line 48, in my_punchcard @http.route('/web/my_page', type="http") AttributeError: 'module' object has no attribute 'route'
I am running Version 7.0-20131203-002409 on an Ubuntu server. I'm developing in Eclipse, which shows a red circle with a white X through it by the original Line 1. So I'm guessing Eclipse knows there's no http in openerp.
My code is like that from doc.openerp.com/trunk/web/web_controllers
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 2/24/14, 2:09 PM|
|Seen: 5864 times|
|Last updated: 3/16/15, 8:10 AM|