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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
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%:
| %
|

¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
oct 21
|
3815 | ||
PDF reports
Resuelto
|
|
5
jul 25
|
2163 | |
Wrong PDF Format
Resuelto
|
|
2
mar 24
|
2701 | |
|
2
may 23
|
3107 | ||
|
0
nov 22
|
2907 |