odoo8 报表页面修改和字体设置

版本8.0, 想要发票修改报表页眉的内容,去公司设置下修改,返现无论如何也不生效。

放狗后得知:

You probably already know that you can customise the default Odoo header/footer by changing the Company settings. However when you create a PDF report such as a sale, quote or invoice you will find the header/footer remains unchanged.

The issue is that Quote/Sale orders do not use the Company-level report header/footer configuration.

To edit the header and footer for Quote/Sale orders you need to edit the QWeb view. Here is how to do this:

(1) Settings > Technical > User Interface > Views
(2) Search for “external”
(3) You will see report.external_layout, report.external_layout_header and report.external_layout_footer
(4) Edit these views as appropriate to modify the PDF version of the Quote/Sales orders

需要到 view视图中,搜索 ‘external’  视图,然后修改 report.external_layout_header ,就可以修改 报表了。

思考: 报表中的  <t t-call="report.external_layout">  就是放入表头,表尾巴, 通过添加不停的 layout, 可以使用不同的表头和表尾格式。

=============附加字体修改

解决方式如下:

1.增加字体:

sudo apt-get install ttf-wqy-zenhei
sudo apt-get install ttf-wqy-microhei

安装后可以在 /usr/share/fonts/truetype/wqy 看到新装的中文字体

2.在‘设置->公司->公司->编辑->报表的结构->字体'里面,选择’搜索更多',然后选择

WenQuanYi Micro Hei 或者 WenQuanYi Zen Hei

保存即可。

 
原文地址:https://www.cnblogs.com/alangwansui/p/6526904.html