For example,
Like the below function,easily set the invisible function in ~addons/hr/views/*.xml
<field name="resign_date" attrs="{'invisible':[('resign_date', '=', '9000-12-31')]}"/>
but how to set the specific field to invisible in printed report in ~addons/hr/report/*.xml
<tr t-foreach="docs" t-as="l">
<td>
<span t-field="l.resign_date"/>
</td>
</tr>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
4283
Views
Hi,
You can use t-if.
<t t-if="your condition"> <span t-field="l.resign_date"/> |
Thanks & Regards
Avinash N K
No matter the date is '9000-12-31' or not,still display in the printed report.What's the mistake of the code?
<td>
<t t-if="l.resign_date != '9000-12-31'">
<span t-field="l.resign_date"/>
</t>
</td>
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
3
Jul 23
|
27769 | ||
|
1
Jul 23
|
1624 | ||
Customize document layout
Solved
|
|
1
Apr 22
|
5406 | |
|
1
Feb 22
|
1722 | ||
[Odoo10] QWeb t-if
Solved
|
|
2
Sep 17
|
13116 |