Odoo Help


Sales Order Report - Changing format of Company Name, Contact Name

Navin Shettigar
on 5/10/16, 10:53 PM 1,128 views

In the Sales order document report the Company Name & Contact person name is displayed as in the Order form view i.e. XYZ Company, Mr. John and then address, phone and fax. I am unable to change it to Only Company Name and then Contact Person's information eg,

XYZ Company




Mr John

Email of MR. John 

Mobile No. of Mr. John

 Can some one please explain how the this syntax works, (Excuse me if some one has already asked this question before.)

<div t-field="doc.partner_invoice_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;, &quot;fax&quot;], &quot;no_marker&quot;: true, &quot;phone_icons&quot;: true}"/>  


Thankyou very much Ray. Your solution worked for me very nicely.

Navin Shettigar
on 5/12/16, 1:51 AM
Ray Carnes
On 5/11/16, 10:51 PM

Make sure you test for the cases where you are selling to:

  • a Company

  • a Contact

  • a Contact at a Company

You probably want most of these fields:

<div t-field="doc.partner_invoice_id.parent_id.name" /> <div t-field="doc.partner_invoice_id.parent_id.street" /> <div t-field="doc.partner_invoice_id.parent_id.street2" /> <div t-field="doc.partner_invoice_id.parent_id.city" /> <div t-field="doc.partner_invoice_id.parent_id.state_id.code" /> <div t-field="doc.partner_invoice_id.parent_id.zip" /> <div t-field="doc.partner_invoice_id.parent_id.country_id" /> <div t-field="doc.partner_invoice_id.parent_id.phone" /> <div t-field="doc.partner_invoice_id.parent_id.fax" /> <div t-field="doc.partner_invoice_id.name" /> <div t-field="doc.partner_invoice_id.email" /> <div t-field="doc.partner_invoice_id.mobile" />

Prakash Sharma
On 5/11/16, 3:02 AM

remove address,fax from the fields Like:

t-field-options='{"widget": "contact", "fields": ["name","phone"]}'

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/10/16, 10:53 PM
Seen: 1128 times
Last updated: 5/12/16, 1:48 AM