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.

18 lines
506 B

  1. # Copyright 2018 Tecnativa - David Vidal
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo import models
  4. from odoo.http import request
  5. class Http(models.AbstractModel):
  6. _inherit = 'ir.http'
  7. def session_info(self):
  8. res = super(Http, self).session_info()
  9. user = request.env.user
  10. res.update({
  11. 'group_export_data': user and user.has_group(
  12. 'web_disable_export_group.group_export_data'),
  13. })
  14. return res