123456789101112131415161718192021222324252627 |
- # -*- coding: utf-8 -*-
- from openerp.http import request as r
- def get_res_users_baco():
- query = '''
- SELECT
- users.id,
- users.company_id,
- users.store_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],
- 'company_id': j[1],
- 'store_id': j[2],
- 'name': j[3],
- } for j in r.cr.fetchall()
- ]
|