res_users.py 340 B

123456789101112131415
  1. # -*- coding: utf-8 -*-
  2. from openerp.http import request as r
  3. _MODEL = 'res.users'
  4. def get_res_users():
  5. return [
  6. {
  7. 'id': user.id,
  8. 'company_id': user.company_id.id,
  9. 'store_id': user.store_id.id,
  10. 'name': user.partner_id.name,
  11. } for user in r.env[_MODEL].search([])
  12. ]