تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
12423 أدوات العرض

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


الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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.
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 25
4715
2
ديسمبر 24
7837
2
نوفمبر 24
28623
2
مايو 24
7551
3
مارس 24
6983