123456789101112131415161718192021 |
- # -*- coding: utf-8 -*-
- from openerp.http import request as r
- def get_res_partner():
- query = '''
- SELECT
- partner.id,
- partner.name,
- partner.active
- FROM res_partner AS partner WHERE partner.customer = true
- '''
- r.cr.execute(query)
- return [
- {
- 'id': j[0],
- 'name': j[1],
- 'active':j[2]
- } for j in r.cr.fetchall()
- ]
|