guidev224
guidev224

Reputation: 199

Odoo: How to get the company infos in qweb report?

How can i get the company infos in qweb report? I have added

<t t-call="report.external_layout">
   --------------
   --------------
   <span t-field="company.partner_id.street"/>
</t>

to my report but i get this error

QWebException: "'NoneType' object has no attribute 'partner_id'" while evaluating 'company.partner_id'

Upvotes: 2

Views: 2688

Answers (1)

sfx
sfx

Reputation: 1841

You can get all the company information like the following

<span t-esc="o.company_id.name"/>
<span t-esc="o.company_id.street"/>
<span t-esc="o.company_id.city"/>
<span t-esc="o.company_id.state_id.name"/>
<span t-esc="o.company_id.zip"/>

OR

<span t-field="res_company.partner_id.name"/>
<span t-field="res_company.partner_id.street"/>
<span t-field="res_company.partner_id.city"/>

Upvotes: 7

Related Questions