python - Odoo - How to acess recordsets on web controller -


i using web controller in odoo 8 make rest api data , return values database. problem not able database builtin orm.
tried call osv.pool.get() gave me error:

attributeerror: type object 'model' has no attribute 'pool'

odoo 8 apparently uses recordsets, can't use too, , couldn't find usefull on docs.

how can browse database data on web controller?

my code:

class testwebservice(http.controller):     @http.route('/test', type='http', auth='none')     def test(self):        objects = osv.osv.pool.get("some_table")        # need objects some_table , search them        return "hello world" 

try following

myobj = request.env['some.table'] 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -