No method was readily available to know if a user is `internal` (has
group `base.group_user`), which was inconsistent with other base groups.
_is_internal is now used in the codebase where it is clear that
`.has_group('base.group_user')` is called on a single record.
Part-of: odoo/odoo#85703
15 lines
424 B
Python
15 lines
424 B
Python
# -*- 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._is_internal():
|
|
res['odoobot_initialized'] = self.env.user.odoobot_state not in [False, 'not_initialized']
|
|
return res
|