Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Insert phone field of a contact in the sale order report

By
Fabien M
on 5/27/16, 9:15 AM 305 views

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

1
Nilesh Sheliya
On 5/28/16, 12:44 AM

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

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

0
Fabien M
On 5/30/16, 4:08 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/27/16, 9:15 AM
Seen: 305 times
Last updated: 5/30/16, 4:08 AM