ผมติดปัญหาเรื่อง font-size ของ pdf report ที่เป็นภาษาไทยกับอังกฤษ
โดย ขนาดมันต่างกันมากเกินไป ตัวเลขก็เหมือนจะไม่ยอมไปใช้ font ภาษาไทย ตามรูป
มีวิธีแนวทางการแก้ไขอย่างไร ขอคำแนะนำด้วยครับ

แจ้งข่าว ทางเว็บบอร์ด openerpthailand.org ได้เปลี่ยนระบบเว็บบอร์ด ใหม่เป็น phpBB 3.1
โค้ด: เลือกทั้งหมด
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<template id="x_layout" inherit_id="web.layout">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/custom_report/static/css/base.css"/>
</xpath>
</template>
</data>
</openerp>
โค้ด: เลือกทั้งหมด
@charset "UTF-8";
.line{
border: 1px solid black;
border-collapse: collapse;
}
.header_table {
background-color:#0F8A97;
color:#ffffff;
height: 20px;
}
table.table1 {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
padding: 1px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
line-height: 1.42857143;
}
table.table1 thead {
background-color:#0F8A97;
color:#ffffff;
padding: 1px;
border: 1px solid black;
}
table.table1 th {
border: 1px solid black;
min-height: 20px;
padding: 1px;
font-weight: normal;
}
table.table1 tr {
border: 1px solid black;
min-height: 20px;
padding: 1px;
}
table.table1 td {
border: 1px solid black;
}
.col-no, .col-name, .col-desc, .col-qty, .col-unitprice, .col-disc, .col-amount, .col-subtotal {
float: left;
}
.col-no {
width: 3%;
}
.col-name {
width: 10%;
}
.col-desc {
width: 45%;
}
.col-qty {
width: 5%;
}
.col-unitprice {
width: 8%;
}
.col-disc {
width: 5%;
}
.col-amount {
width: 12%;
}
.col-subtotal {
width: 12%;
}
โค้ด: เลือกทั้งหมด
{
'name' : 'My Report',
'version' : '1.0',
'depends' : ['base','sale', 'product'],
'author' : 'Kitcle',
'category': 'Qweb Report',
'description': """
""",
'website': 'https://www.facebook.com/OdooFree',
'data': [
'assets.xml',
'sale_report.xml',
'views/report_saleorder.xml',
],
'demo': [],
'installable': True,
'auto_install': False,
'images': [],
}
โค้ด: เลือกทั้งหมด
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="x_layout" name="fdp assets" inherit_id="report.minimal_layout">
<xpath expr="//head" position="inside">
<link rel="stylesheet" href="/fdp_web_custom/static/src/css/base-extend.css"/>
</xpath>
</template>
</data>
</openerp>
โค้ด: เลือกทั้งหมด
@charset "UTF-8";
@font-face {
font-family: 'THSarabunNew';
src: url('/fdp_web_custom/static/src/font/thsarabunnew-webfont.woff');
font-weight: normal;
font-style: normal;
}
body {
font-family: 'THSarabunNew';
}
โค้ด: เลือกทั้งหมด
wk_custom_report
--reports
----report_custom.xml
--static
----font
------thsarabunnew-webfont.woff
----base-extends.css
__init__.py
__manifest__.py
โค้ด: เลือกทั้งหมด
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="custom_report_assets" name="wk_custom_report.custom_report_assets"
inherit_id="web.report_assets_common">
<xpath expr=".">
<link href="/wk_custom_report/static/base-extend.css" rel="stylesheet"/>
</xpath>
</template>
</odoo>
โค้ด: เลือกทั้งหมด
@charset "UTF-8";
@font-face {
font-family: 'THSarabunNew';
src:url('/wk_custom_report/static/font/thsarabunnew-webfont.woff');
font-weight:normal;
font-style:normal;
}
body {
font-family: 'THSarabunNew';
font-size: 14px;
}
div {
border: 1px solid red;
}
โค้ด: เลือกทั้งหมด
{
'name': 'Report PDF Customize',
'description': 'Customize report.',
'author': 'W K.',
'depends': ['web'],
'data': [
# QWeb Report
'reports/report_custom.xml'
]
}
กำลังดูบอร์ดนี้: 3 และ บุคคลทั่วไป 0 ท่าน