How to add a field on a report only if a box is checked? |
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- सीआरएम
- e-Commerce
- लेखांकन
- इन्वेंटरी
- PoS
- Project
- MRP
This question has been flagged
Hi Team,
In some cases, your client would like to see an information on the SO only if a box is checked.
Here is the solution:
1) Add a checkbox field on the model sale.order: x_appear
2) On the report Qweb view related to this model, you should add a "t-if" on the field you want to see or not on the report (with a xpath, of course)
Here is an example for the Margin (and other fields my clients wanted to see (report below the code):
Total Cost:
|
|
Margin:
|
|
Margin%:
| %
|

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 | |
---|---|---|---|---|
|
1
अक्तू॰ 21
|
3825 | ||
PDF reports
Solved
|
|
5
जुल॰ 25
|
2169 | |
Wrong PDF Format
Solved
|
|
2
मार्च 24
|
2705 | |
|
2
मई 23
|
3110 | ||
|
0
नव॰ 22
|
2918 |