summaryrefslogtreecommitdiff
path: root/addons/mail_bot/models/ir_http.py
blob: 1c5c391630c3d489304c1a8cc3991d33853de174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import models


class Http(models.AbstractModel):
    _inherit = 'ir.http'

    def session_info(self):
        res = super(Http, self).session_info()
        if self.env.user.has_group('base.group_user'):
            res['odoobot_initialized'] = self.env.user.odoobot_state not in [False, 'not_initialized']
        return res