28 lines
674 B
Python
28 lines
674 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
import json
|
|
|
|
from odoo import models
|
|
from odoo.http import request
|
|
|
|
|
|
class Http(models.AbstractModel):
|
|
_inherit = 'ir.http'
|
|
|
|
@classmethod
|
|
def _post_logout(cls):
|
|
request.future_response.set_cookie('color_scheme', max_age=0)
|
|
|
|
def webclient_rendering_context(self):
|
|
""" Extend the rendering context with session info."""
|
|
return {
|
|
'session_info': self.session_info(),
|
|
}
|
|
|
|
def session_info(self):
|
|
ICP = self.env['ir.config_parameter'].sudo()
|
|
|
|
result = super(Http, self).session_info()
|
|
result['support_url'] = "https://exp-sa.com/support_center"
|
|
return result
|