res_store.py 307 B

123456789101112131415161718
  1. # -*- coding: utf-8 -*-
  2. from openerp.http import request as r
  3. def get_res_store_widget():
  4. query = '''
  5. SELECT id,
  6. name
  7. FROM res_store
  8. '''
  9. r.cr.execute(query)
  10. return [
  11. {
  12. 'id': j[0],
  13. 'name': j[1],
  14. } for j in r.cr.fetchall()
  15. ]