I want to see notes field of the purchase order in the report too. I have added the field by inheritance once and also by changing the purchase module code but i am getting an error with report . All other fields are working and fetching data. It is basically a purchase comparison report. Please help and tell me what i am doing wrong and what should i do.
here is my code for notes field
<t t-foreach="data" t-as="question">
<tr class="row2">
<td class="table_td">
<span t-esc="i" />
</td>
<td style="border:solid #d1cfcf 1px;padding:5px;line-height: 13px;">
<span t-esc="question['product_name']" />
</td>
<td class="table_td">
<span t-esc="question['uom']" />
</td>
<td class="table_td">
<span t-esc="question['qty']" />
</td>
<t t-foreach="data" t-as="question">
<t t-foreach="question['amt']" t-as="amount">
<td class="table_td">
<span t-esc="amount['price']" />
</td>
<td class="table_td">
<span t-esc="amount['total_amount']" />
</td>
<td class="table_td">
<span t-esc="amount['notes']" />
</td>
</t>
everything is working except notes. The error i am getting is
error
'notes' Traceback (most recent call last): File "C:\odoo\odoo\odoo\addons\base\ir\ir_qweb\qweb.py", line 343, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_1059_1060 File "<template>", line 2, in body_call_content_1059 File "<template>", line 74, in foreach_1058 File "<template>", line 88, in foreach_1057 File "<template>", line 89, in foreach_1056 KeyError: 'notes' Error to render compiling AST KeyError: 'notes' Template: 1059 Path: /templates/t/t/div/div/div/div[4]/table/thead/tr[2]/t[3]/tr/t/t[1]/td[3]/span Node: <span t-esc="amount['notes']"/>
Hope this will helps, https://goo.gl/8HgnCF