Monday, August 30, 2021

Display current company data

 In this blog we will explain how to display current company data in web page in odoo 14


First we can get the current company in the web page template by using
request.env.user.company_id


so we can show the current company logo by using 

<img t-if="request.env.user.company_id.logo" t-att-src="image_data_uri(request.env.user.company_id.logo)" style="max-height:45pt;max-width:90%" alt="Company Logo"/>
 
and we can show the current company name by using

<span t-esc="request.env.user.name"/>

and so on to display each field in the model res.company

No comments:

Post a Comment

Odoo Invoice Qr code issues

There are two main issues must of us facing with the QR code in Odoo invoice & these issues are 1/ QR code displayed as broken image w...