web_tour/models/ir_http.py
Данил Воробьев 9341a5d690 initial commit
2024-05-03 12:34:42 +00:00

17 lines
553 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):
result = super().session_info()
if result['is_admin']:
demo_modules_count = self.env['ir.module.module'].sudo().search_count([('demo', '=', True)])
result['web_tours'] = self.env['web_tour.tour'].get_consumed_tours()
result['tour_disable'] = demo_modules_count > 0
return result