Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
5289 Ansichten

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

Address    

Phone

Fax 

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}"/>  

                                              



Avatar
Verwerfen
Autor

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

Beste Antwort

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" />

Avatar
Verwerfen
Beste Antwort

remove address,fax from the fields Like:

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