The show_effect was either "True" or false which is inconsistent. This was caused by the fact that the string value came from the backend and the boolean came from the default value of get_param. By wrapping the result of get_param in a bool constructor, we make sure the type is always consistent. closes odoo/odoo#78742 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
15 lines
497 B
Python
15 lines
497 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
from odoo import models
|
|
from odoo.http import request
|
|
|
|
|
|
class IrHttp(models.AbstractModel):
|
|
_inherit = 'ir.http'
|
|
|
|
def session_info(self):
|
|
result = super(IrHttp, self).session_info()
|
|
if request.env.user.has_group('base.group_user'):
|
|
result['show_effect'] = bool(request.env['ir.config_parameter'].sudo().get_param('base_setup.show_effect'))
|
|
return result
|