You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
649 B
20 lines
649 B
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:
|
|
result['user_companies']['allowed_companies'][company.id].update({
|
|
'has_background_image': bool(company.background_image),
|
|
})
|
|
return result
|