addons14/web_company_color/models/ir_qweb.py
def _render(self, id_or_xml_id, values=None, **options):
        """ Adds the active company to the context """
        try:
            active_company_id = int(
                request.httprequest.cookies.get("cids", "").split(",")[0]
            )
        except Exception:
            active_company_id = False
        company_id = (
            self.env["res.company"].browse(active_company_id)
            or self.env.user.company_id
        )
        self = self.with_context(active_company_id=company_id.id)
        return super()._render(id_or_xml_id, values=values, **options)
 Adds the active company to the context 
Adds the active company to the context
Adds the active company to the context
def _render(self, id_or_xml_id, values=None, **options):
        try:
            active_company_id = int(
                request.httprequest.cookies.get("cids", "").split(",")[0]
            )
        except Exception:
            active_company_id = False
        company_id = (
            self.env["res.company"].browse(active_company_id)
            or self.env.user.company_id
        )
        self = self.with_context(active_company_id=company_id.id)
        return super()._render(id_or_xml_id, values=values, **options)
def _render ( self , id_or_xml_id , values = None , ** options ) : try : active_company_id = int ( request . httprequest . cookies . get ( "cids" , "" ) . split ( "," ) [ 0 ] ) except Exception : active_company_id = False company_id = ( self . env [ "res.company" ] . browse ( active_company_id ) or self . env . user . company_id ) self = self . with_context ( active_company_id = company_id . id ) return super ( ) . _render ( id_or_xml_id , values = values , ** options )
Adds the active company to the context
Adds the active company to the context
""" Adds the active company to the context """
self
id_or_xml_id
values