Skip to Content
Menu
This question has been flagged
1 Reply
3810 Views
<t t-if="docs.sbl_template is not False"> #This code is not working why?,this is a html field
<div class="header">
<div class="row">
<div class="col-xs-6">
<img t-if="res_company.logo" t-att-src="'data:image/png;base64,%s' % res_company.logo" class="headimg" />
</div>
<div class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;" />
</div>
</div>
</div>
</div>
<div id="logistics_page" class="page">
<div class="container">
<span t-field="docs.sbl_template" />
</div>
</div>
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul class="list-inline">
<t t-set="company" t-value="res_company.sudo()" />
<li t-if="res_company.phone">Phone: <span t-field="res_company.phone" /></li>
<li t-if="res_company.fax and res_company.phone">&amp;bull;</li>
<li t-if="res_company.fax">Fax: <span t-field="res_company.fax" /></li>
<li t-if="res_company.email and res_company.fax or res_company.email and res_company.phone">&amp;bull;</li>
<li t-if="res_company.email">Email: <span t-field="res_company.email" /></li>
<li t-if="res_company.website and res_company.email or res_company.website and res_company.fax or res_company.website and res_company.phone">&amp;bull;</li>
<li t-if="res_company.website">Website: <span t-field="res_company.website" /></li>
</ul>
<!--<t t-if="res_company.custom_footer">-->
<!--<span t-raw="res_company.rml_footer"/>-->
<!--</t>-->
<ul class="list-inline">
<li>Page:</li>
<li><span class="page" /></li>
<li>/</li>
<li><span class="topage" /></li>
</ul>
</div>
</div>
</t>
Avatar
Discard
Best Answer

Hi,

I think, Is not False is not required there, you can remove it.

<t t-if="docs.sbl_template">

The above line of code is checking whether there is value in docs.sbl_template , the following code inside this will be executed only if it is True.

So Change the  first line in your code like this. May it will resolve your issue.

Thanks

Avatar
Discard
Author

No..its not working Niyas..

<t t-esc='docs.sbl_template'/> and look whats there in it

Author

Okay let me check .thx