コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
5061 ビュー

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

                                              



アバター
破棄
著作者

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

最善の回答

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

アバター
破棄
最善の回答

remove address,fax from the fields Like:

t-field-options='{"widget": "contact", "fields": ["name","phone"]}'
アバター
破棄