在odoo10中的打印按钮上打印报告 [英] Print report on print button in odoo10
问题描述
我在打印报告时遇到问题.我已经用 html 编码了报告格式,然后制作了它的模块并将其与相关模型附加在一起.并上传到我的在线服务器
首先我收到此错误:Wkhtmltopdf 失败(错误代码:-6).消息:开关--header-spacing,不支持使用未打补丁的qt,将被忽略.开关--header-html,不支持使用未打补丁的qt,将被忽略.开关--footer-html,不支持使用未修补的qt,将被忽略.QXcbConnection:无法连接到显示器
我使用以下链接解决了这个问题 并在侧面显示此错误
问题:
1).如何直接从打印按钮打印报告而不会出现这些错误.
我们的一个客户允许我们访问那里的 ERP 以进行一些更改,我看到当我们单击那里的 ERP 上的打印按钮时,它会下载报告的 PDF 版本,然后我们将其打印出来.所以
2).我们如何下载 PDF 格式的报告.
我使用的是 odoo10 而不是 odoo8.提前致谢
试试这个解决方案:
下载这个 -https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
然后按照以下步骤操作:(如果关于 WKHTMLTOPDF 没有安装,那么第一步必须安装)1) sudo dpkg -i http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
2) 须藤 ln -s/usr/local/bin/wkhtmltopdf/usr/bin3) 须藤 ln -s/usr/local/bin/wkhtmltoimage/usr/bin
也许它会帮助你.
Hi I am having a problem in printing the report. I have coded the report format in html and then made its module and attached it with the relevant model. and upload it on my online server
First I was receiving this error : Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display
I have solved this problem using this following link https://gist.github.com/tejastank/45b6eba13fb38e24110218e3ce50129b
Its still not printing but keeps on creating child of the report in rec_name area, please see the attachment and showing this error on the side
Questions:
1).How I can print the report directly from the print button without getting these errors.
One of our client give us access of there ERP for some changes, I have seen there reports when we click on print button on there ERP it downloads the PDF version pf the report and then we print it. so
2). How can we download the report in PDF formate.
I am using odoo10 not odoo8. Thanks in advance
Try this Solution :
Downlaod this -https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
and then follow the step : (IF THE ABOUT WKHTMLTOPDF IS NOT INSTALL THAN AND THAN 1ST STEP HAVE TO DO IT) 1) sudo dpkg -i http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
2) sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin 3) sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
may be it will help you.
这篇关于在odoo10中的打印按钮上打印报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!