为什么我的pdf报告在Odoo中不能很好地采用CSS样式? [英] Why my pdf report is not taking the CSS styles well in Odoo?

查看:255
本文介绍了为什么我的pdf报告在Odoo中不能很好地采用CSS样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu Server中使用Odoo 10.我正在尝试使用wkhtmltopdf以pdf格式打印我的报价报告.但是设计看起来并不好.看来CSS无法正常工作

I am using Odoo 10 in Ubuntu Server. I am trying to print my quotation report in pdf format using wkhtmltopdf. But the design doesn't look nice. It looks like the CSS is not working

我试图更改mypath/addons中的一些XML文件,但是它不起作用

I have tried to change some XML file inside mypath/addons but it doesn't work

这是我的报价pdf文件:

Here's my quotation pdf file:

推荐答案

第一个可能的原因

如果您的报告没有样式,请尝试在设置>参数>系统参数中添加其中一些参数:

1st Possible Reason

If your report doesn't have styles try to add some of these parameters in Settings > Parameters > System parameters:

  • web.base.url:<IP address>:<Port>
  • web.base.url.freeze:True.如果未使用此参数,则如果管理员登录Odoo,则会使用地址栏中的当前地址更新web.base.url参数.
  • report.url:<IP address>:<Port>.如果web.base.url参数不足以使其起作用,则应使用此参数.通常,此网址应为:http://127.0.0.1:8069
  • web.base.url: <IP address>:<Port>
  • web.base.url.freeze: True. If this parameter is not used then if the administrator log in Odoo the web.base.url parameter is updated with the current addres that's in the address bar.
  • report.url: <IP address>:<Port>. This should be used if web.base.url parameter is not enough to make it work. Usually this url should be: http://127.0.0.1:8069

此外,wkhtmltopdf软件包可能安装不正确或版本不正确. > 您可以在此处查看0.12.5版 与Odoo v10及更高版本配合使用.

Also it is possible that the package wkhtmltopdf is not well installed or it has not the correct version. Here you can check the release 0.12.5 that works well with Odoo v10 and later versions.

根据建议 此处 ,报告内容必须位于该元素的内部特定类别:<div class="page">

这篇关于为什么我的pdf报告在Odoo中不能很好地采用CSS样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆