Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
4430 Vistas

Hello, I'm a beginner in database and I'm customing my sale order report. I don't work with Python, only XML Qwebs.

I added a manytoone field "x_contact" in sale.order.form where I can choose one of my differents contacts,  then I wrote in report_invoice_document "<span t-field="doc.x_contact"/>.

I would like to insert a field in the report, which can bring me the contact phone, automatically.

My goal : display contact informations in the report, only by filling x_contact in the sale order form.


How can I write the <span t-field> ? Is it possible ?

Thank you

Avatar
Descartar
Mejor respuesta

You can access phone from contact in qweb report by writing below line in your template.

<span t-field="doc.x_contact.phone"/>

Avatar
Descartar
Autor Mejor respuesta

Thank you, I notice it's very intuitive, I understand how it works now. Will be useful for many requests ! :)

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
abr 23
8499
3
sept 20
4441
2
abr 20
6191
0
ene 25
1124
0
ago 24
1632