I am developing a module in which I am defining a controller class (openerpweb.Controller).
I have defined a function with decorator (@ openerpweb.httprequest) because access to this function we do through a http request "httprequest". The problem is that from here I need to access to the some function model, and when I do get an error. class Json(openerpweb.Controller): _cp_path = "/df_document/json"
@openerpweb.httprequest
def load(self, req, id, do_not_eval=False):
Model = req.session.model('document.directory')
directory_model = Model.search([('parent_id', '=', int(id))])
Error is raise AuthenticationError("Credentials not provided") AuthenticationError: Credentials not provided