Can not create printed report (qWeb PDF).
I've created primitive module for test with one model '_testrep.rent' with one field 'name'
I've created report.xml:
<odoo>
<data>
<report
id="report_rent"
name="_testrep.report_rent_view"
model="_testrep.rent"
string="Test Report"
report_type="qweb-pdf" />
<template id="report_rent_view">
<h2>test report</h2>
</template>
</data>
</odoo>
declared it in __manifest__.py
'data': [
# 'security/ir.model.access.csv',
'views/report.xml',
'views/menu.xml',
],
every trying to print brings to error
report: (<type 'exceptions.KeyError'>, KeyError('report',), <traceback object at 0x04DDEBC0>)
full error description in log file gives me nothing:
2017-06-21 07:15:17,477 6732 ERROR ODOO_DEV odoo.service.report: Exception: 'report'
Traceback (most recent call last):
File "C:\SOFT\Odoo 10.0\server\odoo\service\report.py", line 94, in go
File "C:\SOFT\Odoo 10.0\server\odoo\report\__init__.py", line 19, in render_report
File "C:\SOFT\Odoo 10.0\server\odoo\addons\base\ir\ir_actions.py", line 232, in render_report
File "C:\SOFT\Odoo 10.0\server\odoo\api.py", line 752, in __getitem__
File "C:\SOFT\Odoo 10.0\server\odoo\modules\registry.py", line 174, in __getitem__ KeyError: 'report'
2017-06-21 07:15:17,730 6732 ERROR ODOO_DEV odoo.addons.web.controllers.main: An exception occured during an http request Traceback (most recent call last):
File "C:\SOFT\Odoo 10.0\server\odoo\addons\web\controllers\main.py", line 70, in wrap
File "C:\SOFT\Odoo 10.0\server\odoo\addons\web\controllers\main.py", line 1475, in index
File "C:\SOFT\Odoo 10.0\server\odoo\http.py", line 118, in dispatch_rpc
File "C:\SOFT\Odoo 10.0\server\odoo\service\report.py", line 35, in dispatch
File "C:\SOFT\Odoo 10.0\server\odoo\service\report.py", line 144, in exp_report_get
File "C:\SOFT\Odoo 10.0\server\odoo\service\report.py", line 122, in _check_report UserError: (u"report: (<type 'exceptions.KeyError'>, KeyError('report',), <traceback object at 0x04A73EB8>)", None)
Can not solve this problem for several days, please help someone.
Problem resolved strange way. I've installed custom module, it installed some dependences, and reports began to work. Dependencies is 'Discuss', 'Contacts' and 'Fleet'. Thus absolutely not clear, what it was.