getting error ImportError: No module named 'odoo.report' in odoo 11

我与影子孤独终老i 提交于 2019-12-11 06:44:54

问题


I'm getting an error

ImportError: No module named 'odoo.report'

while converting my codes from odoo version 10 to odoo version 11. My code is given below and how can I use those following code in Odoo 11?

from odoo.report.render.rml2pdf import utils
from odoo.report.render.rml2pdf import color

Thanks in advance


回答1:


In odoo 11 no need to use odoo.report lib. It is deprecated. You can use odoo.tools insted of that.

Just import it with following statement:

from odoo.tools import report


来源:https://stackoverflow.com/questions/46883550/getting-error-importerror-no-module-named-odoo-report-in-odoo-11

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!