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
此问题已终结
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%:
| %
|

相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
10月 21
|
3827 | ||
PDF reports
已解决
|
|
5
7月 25
|
2182 | |
Wrong PDF Format
已解决
|
|
2
3月 24
|
2709 | |
|
2
5月 23
|
3111 | ||
|
0
11月 22
|
2930 |