21 lines
677 B
Python
21 lines
677 B
Python
from odoo import models
|
|
from odoo.http import request
|
|
|
|
|
|
class IrHttp(models.AbstractModel):
|
|
|
|
_inherit = "ir.http"
|
|
|
|
#----------------------------------------------------------
|
|
# Functions
|
|
#----------------------------------------------------------
|
|
|
|
def session_info(self):
|
|
result = super(IrHttp, self).session_info()
|
|
if request.env.user._is_internal():
|
|
for company in request.env.user.company_ids.with_context(bin_size=True):
|
|
result['user_companies']['allowed_companies'][company.id].update({
|
|
'has_background_image': bool(company.background_image),
|
|
})
|
|
return result
|