You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
497 B

  1. # -*- coding: utf-8 -*-
  2. from openerp.http import request
  3. from openerp.addons.web.controllers.main import Session
  4. class MainController(Session):
  5. def session_info(self):
  6. res = super(MainController, self).session_info()
  7. groups = request.env['ir.model.data'].sudo().search([
  8. ('model', '=', 'res.groups'),
  9. ('res_id', 'in', request.env.user.groups_id.ids)
  10. ])
  11. res['group_refs'] = groups.mapped(lambda g: g.complete_name)
  12. return res