Odoo Help

4 Answers
Daan Veldhof
5/28/18, 2:51 AM

I was checking the .config file when I noticed the server_wide_modules parameter. When I added my custom module to that parameter everything worked fine.

server_wide_modules = web,web_kanban,test_module

I just faced the same problem. When I am authenticated, I can access the controller when I am not I get a server error.

The solution that worked for me is to add a sudo before the execution of the create. Below you can find my code.


# -*- coding: utf-8 -*-
import werkzeug
from odoo import http
from odoo.http import request
import logging
class MyClass(http.Controller):
    @http.route(['/route'], type='http', auth="none", csrf=False)
    def your_function(self, a):   
        #a is the paramater I send through the http request
        logging.error("it is working")
        vals = {'value': a,}
        return "ok"
Ask a Question
Keep Informed
1 follower(s)
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.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now