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:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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%:
| %
|

Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 10 21
|
3811 | ||
PDF reports
Đã xử lý
|
|
5
thg 7 25
|
2161 | |
Wrong PDF Format
Đã xử lý
|
|
2
thg 3 24
|
2697 | |
|
2
thg 5 23
|
3107 | ||
|
0
thg 11 22
|
2903 |