res_store.py 372 B

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