Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3257 มุมมอง

On report_saleorder_document:


If I use:

<t t-set="o" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
     <span t-field="o.partner_id"/>
</t>

Report displays Azure Interior, Brandon Freeman, both the company and the person's name.


If I use:

<t t-set="o" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
     <span t-field="o.partner_id.name"/>
</t>

Report displays Brandon Freeman, the name of the person


But how do I get the report to display ONLY the client's company name?

Also, is it possible to edit report_saleorder_document using notepad++ or pycharm, instead of odoo's document layout editor? Where is this file stored?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Found the answer on someone else's question:

<t t-set="o" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
     <span t-field="o.partner_id.parent_id"/>
</t>

Thanks !

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด
<t t-set="o" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
     <span t-field="o.partner_id.company_name"/>
</t>

Use this. Company name is stored in field 'company_name'

อวตาร
ละทิ้ง