res_bank.py 310 B

12345678910111213141516
  1. # -*- coding: utf-8 -*-
  2. from openerp.http import request
  3. import simplejson as json
  4. _MODEL = 'res.bank'
  5. def get_banks():
  6. banks = [
  7. {
  8. 'id': bank.id,
  9. 'name': bank.display_name
  10. } for bank in request.env[_MODEL].search([('active', '=', True)])
  11. ]
  12. return banks