res_bank.py 317 B

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