0
votes

I need to use company currency id in qweb report. i tried below codes, but nothing worked. Getting an error:
AttributeError: 'NoneType' object has no attribute 'id'

<span t-esc="company.id"/>

<span t-esc="o.company.id"/>
1

1 Answers

2
votes

If o is the name of your record, which the report is printed for, and if the guideline from odoo was followed (which means the company is saved under the field company_id), then it should be:

<!-- example for currency name -->
<span t-field="o.company_id.currency_id.name" />
<!-- example for currency symbol -->
<span t-field="o.company_id.currency_id.symbol" />