Hello Community,
its a weird problem, the if case is just not working when i want achieve for an empty field a "Text":
So i dont get the information "MIssing ZIP" on my report if the field is empty = "":
Would be really nice if someone could help me further!
Specific Code:
<t t-if="doc.zip==''">Missing Zip </t>
<t t-else=""> <span t-field ="doc.zip"/> </t>
If the Field is not Empty the programm shows me what i need, i checked also with a the field value "1" then it was working!
so no "text" for a empty field ""
i hope you can understand my question
Full Code:
<?xml version="1.0"?>
<t t-name="web_studio.report_business">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<div class="page">
<div class="row">
<div name="address" class="col-xs-5 col-xs-offset-7">
<div t-field="doc.x_studio_field_dRWmD" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": True}"/>
</div>
</div>
<h2 name="title">
<strong>
<t t-esc="doc.name"/>
<t t-if="doc.zip==''">Missing Zip </t>
<t t-else=""> <span t-field ="doc.zip"/> </t>
<span t-field="doc.x_studio_field_qEtRr"/><br/><span t-field="doc.street"/><br/>
<span t-field="doc.x_studio_field_UDBGP.parent_id.street"/><br/>
</strong>
</h2>
<template id="report_saleorder_style" inherit_id="report.style">
<xpath expr=".">
<t>
.example-css-class {
background-color: red;
}
</t>
</xpath>
</template>
<div class="row mt32 mb32">
<div name="date" class="col-xs-3">
<strong>Zählersetzungstermin</strong>
<p>
<t t-esc="doc.x_studio_field_UBz8Y"/>
</p>
</div>
</div>
<p name="note">
<strong>Note:</strong>
</p>
</div>
</t>
</t>
</t>
</t>