Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4487 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
kwi 23
8594
3
wrz 20
4534
2
kwi 20
6316
0
sty 25
1250
0
sie 24
1728