# -*- coding: utf-8 -*- from openerp.http import request import simplejson as json _MODEL = 'res.bank' def get_banks(): banks = [ { 'id': bank.id, 'name': bank.display_name } for bank in request.env[_MODEL].search([('active', '=', True)]) ] return banks