Community mailing list archives

community@mail.odoo.com

Re: Odoo Backend Field value to CSS

by
Ryan Cole
- 10/21/2016 17:48:13
Hi Tanzilul,


Try this instead:

<div id="comments1" class="parallax-section"  t-att-style="'background-image: url(data:image/png;base64,' + res_company.website_logo_img + ');'">


Kind regards,
Ryan Cole


From: "MD Tanzilul Hasan Khan" <ponkhi403@gmail.com>
To: "Community" <community@mail.odoo.com>
Sent: Saturday, October 22, 2016 12:30:14 AM
Subject: Re: Odoo Backend Field value to CSS

I am trying to use following code - 
<div id="comments1" class="parallax-section"  t-att-style="'background-image:' + 'url(' + 'data:image/png;base64,' + res_company.website_logo_img + ')'">

website_logo_img is my custom binary field. But it shows error like following on the website:




But if I use binary code directly instead of res_company.website_logo_img , it works.

How can I fix this?






On Fri, Oct 21, 2016 at 10:44 AM, MD Tanzilul Hasan Khan <ponkhi403@gmail.com> wrote:
Hello Everyone,
Is there anyway to take odoo backend field value to CSS file?

Regards,
--
MD. Tanzilul Hasan Khan.







--
MD. Tanzilul Hasan Khan.




_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe