Skip to Content
Menu
This question has been flagged
1 Reply
11380 Views

odoo 10

Calling a report, I have the following error message:

Traceback (most recent call last):
  File "/home/odooadmin/OCB/addons/report/controllers/main.py", line 100, in report_download
    response = self.report_routes(reportname, converter='pdf', **dict(data))
  File "/home/odooadmin/OCB/odoo/http.py", line 507, in response_wrap
    response = f(*args, **kw)
  File "/home/odooadmin/OCB/addons/report/controllers/main.py", line 45, in report_routes
    pdf = report_obj.with_context(context).get_pdf(docids, reportname, data=data)
  File "/home/odooadmin/OCB/addons/report/models/report.py", line 195, in get_pdf
    save_in_attachment = self._check_attachment_use(docids, report)
  File "/home/odooadmin/OCB/addons/report/models/report.py", line 320, in _check_attachment_use
    for record_id in docids:
TypeError: 'NoneType' object is not iterable

Report definition is the following:

<odoo>    
    <data>        
        <report
             id="report_contract_receipt" string="Contract Receipt"
             model="print.contract.wizard"
             report_type="qweb-pdf"
             name="logicos.report_contract_receipt_view"
             attachment_use="False"
             file="logicos.contract_receipt"/>
    </data>
</odoo>

I don't understand if the problem is in report definition or in report view.

Please help me to understand where to investigate.

Thanks


Avatar
Discard
Author Best Answer

changing report_type="qweb-pdf" in report_type="qweb-html"

it works.
Update, resolved.
Problem was, after changed attachment_use from true to false, didn't update value in field 
ir_act_report_xml.attachment and ir_act_report_xml.attachment_use.
Avatar
Discard
Related Posts Replies Views Activity
2
Nov 24
25097
2
May 24
5519
3
Mar 24
4964
0
Mar 24
263
3
Feb 24
11421