# -*- coding: utf-8 -*- from openerp.http import request as r def get_user_info(): query = ''' SELECT users.id, partner.name FROM res_users AS users LEFT JOIN res_partner AS partner ON partner.id = users.partner_id WHERE users.active = true ''' r.cr.execute(query) return [ { 'id': j[0], 'name': j[1], } for j in r.cr.fetchall() ]