ir_http.py 424 B

123456789101112131415
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo import models
  4. class Http(models.AbstractModel):
  5. _inherit = 'ir.http'
  6. def session_info(self):
  7. res = super(Http, self).session_info()
  8. if self.env.user._is_internal():
  9. res['odoobot_initialized'] = self.env.user.odoobot_state not in [False, 'not_initialized']
  10. return res