Skip to Content
Menu
This question has been flagged
2 Replies
2708 Views

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?

Avatar
Discard
Author Best Answer

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 !

Avatar
Discard
Best Answer
<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'

Avatar
Discard