แจ้งข่าว ทางเว็บบอร์ด openerpthailand.org ได้เปลี่ยนระบบเว็บบอร์ด ใหม่เป็น phpBB 3.1- บุคคลทั่วไป จะไม่สามารถเข้าอ่านกระทู้บางบอร์ด แนะนำให้ท่าน สมัครสมาชิกคลิกตามลิงค์นี้
- สมาชิกใหม่ ถ้ายังไม่ได้แนะนำตัวจะไม่สามารถ ตั้งกระทู้ และ ดาวน์โหลด ไฟล์จากเว็บบอร์ดได้ ท่านจำเป็นต้องแนะนำตัวที่หมวดนี้
- ถ้ามีปัญหาการใช้งาน หรือ ข้อเสนอแนะใดๆ แนะนำได้ที่นี่
- ปุ่มรูปหัวใจใต้โพส แต่ละโพส ท่านสามารถกดเพื่อสื่อถึงคนโพสนั้นถูกใจท่าน
- ห้ามลง E-mail, เบอร์โทรส่วนตัว, Line id หรือข้อมูลส่วนตัวอื่นๆ เพื่อป้องกันการแอบอ้างและโฆษณาแฝง โดยสามารถติดต่อสมาชิกท่านอื่นผ่านระบบ PM ของบอร์ด
- ท่านสามารถปิดการแจ้งนี้ได้ ที่มุมขวาของกล่องข้อความนี้
บุคคลทั่วไปสามาเข้าสู่ระบบ ด้วย Account ของ FaceBook ได้แล้ว คลิกที่นี่ได้เลย
ปัญหาการออกรายงานภาษาไทยครับ กลายเป็นตัวเหลี่ยม ใน OpenERP 7.0
กฎการใช้บอร์ด
หมวดนี้สำหรับนักพัฒนา
ลงโค้ดอย่าลืมครอบโค้ด เพื่อการแสดงผลที่อ่านง่ายสำหรับคนตอบ
หมวดนี้สำหรับนักพัฒนา
ลงโค้ดอย่าลืมครอบโค้ด เพื่อการแสดงผลที่อ่านง่ายสำหรับคนตอบ
-
phatcharapon
- โพสต์: 30
- ลงทะเบียนเมื่อ: อังคาร 12 มี.ค. 2013 10:34 pm
ปัญหาการออกรายงานภาษาไทยครับ กลายเป็นตัวเหลี่ยม ใน OpenERP 7.0
ผมทำตามวิธีที่ท่านแอดมินได้โพสบอกตามกระทู้ต่างๆครับ แต่ว่ายังไม่สามารถออกรายงานเป็นภาษาไทยได้ ผมได้แนบไฟล์ customfonts.py มาให้ดูครับ ผมได้ติดตั้ง font TH Niramit AS ไปครับ ที่ /usr/share/fonts/truetype
คุณไม่มีสิทธิ์ดูไฟล์ที่แนบมาในกระทู้
-
openerpthailand
- Administrator
- โพสต์: 2319
- ลงทะเบียนเมื่อ: ศุกร์ 13 ก.ค. 2012 7:27 pm
- ติดต่อ:
Re: ปัญหาการออกรายงานภาษาไทยครับ
ทำตามกระทู้ไหนครับ
เท่าที่ดูไฟล์ .rml font ยังเป็น ของเก่าทั้งหมดนะครับ
และขอ font หน่อยครับเดี๋ยวช่วย ทดสอบดูให้ครับ
เท่าที่ดูไฟล์ .rml font ยังเป็น ของเก่าทั้งหมดนะครับ
และขอ font หน่อยครับเดี๋ยวช่วย ทดสอบดูให้ครับ
สมาชิกใหม่กรุณาแนะนำตัว ก่อนตั้งคำถามใดๆ ไม่แนะนำตัวก่อนไม่มีคนคุยด้วยไม่รู้ด้วยนา...ทำความรู้จัก ระบบ ERP โปรแกรม OpenERP ของฟรีที่บริษัทไหนๆก็ใช้ได้
-
phatcharapon
- โพสต์: 30
- ลงทะเบียนเมื่อ: อังคาร 12 มี.ค. 2013 10:34 pm
Re: ปัญหาการออกรายงานภาษาไทยครับ
ทำตามกระทู้นี้ครับ http://www.openerpthailand.org/viewtopic.php?f=10&t=161 ผมได้แนบไฟล์ font TH Niramit AS มาให้ครับ
คุณไม่มีสิทธิ์ดูไฟล์ที่แนบมาในกระทู้
-
openerpthailand
- Administrator
- โพสต์: 2319
- ลงทะเบียนเมื่อ: ศุกร์ 13 ก.ค. 2012 7:27 pm
- ติดต่อ:
Re: ปัญหาการออกรายงานภาษาไทยครับ
วันนี้ ดูให้ครับ แล้วจะมาเขียน how to แบบ step by step ให้ครับ
สมาชิกใหม่กรุณาแนะนำตัว ก่อนตั้งคำถามใดๆ ไม่แนะนำตัวก่อนไม่มีคนคุยด้วยไม่รู้ด้วยนา...ทำความรู้จัก ระบบ ERP โปรแกรม OpenERP ของฟรีที่บริษัทไหนๆก็ใช้ได้
-
openerpthailand
- Administrator
- โพสต์: 2319
- ลงทะเบียนเมื่อ: ศุกร์ 13 ก.ค. 2012 7:27 pm
- ติดต่อ:
Re: ปัญหาการออกรายงานภาษาไทยครับ
สมาชิกใหม่กรุณาแนะนำตัว ก่อนตั้งคำถามใดๆ ไม่แนะนำตัวก่อนไม่มีคนคุยด้วยไม่รู้ด้วยนา...ทำความรู้จัก ระบบ ERP โปรแกรม OpenERP ของฟรีที่บริษัทไหนๆก็ใช้ได้
Re: ปัญหาการออกรายงานภาษาไทยครับ กลายเป็นตัวเหลี่ยม ใน OpenERP 7.0
ผมลองดูใน windows7 แล้วไม่ได้ครับ ยังเหลี่ยมๆ อยู่ครับ แนะนำหน่อยครับ ขอบคุณครับ
-
derkeden901
- โพสต์: 9
- ลงทะเบียนเมื่อ: ศุกร์ 07 พ.ย. 2014 10:27 pm
Re: ปัญหาการออกรายงานภาษาไทยครับ กลายเป็นตัวเหลี่ยม ใน OpenERP 7.0
ใน windows 7 ทำยังไงอ่ะครับ ยังเหลี่ยมยุเลยครับผม
- ร้านจตุรพร
- โพสต์: 5
- ลงทะเบียนเมื่อ: พฤหัสฯ. 02 มิ.ย. 2016 12:52 pm
Re: ปัญหาการออกรายงานภาษาไทยครับ กลายเป็นตัวเหลี่ยม ใน OpenERP 7.0
รบกวนช่วยดูให้ผมด้วยครับ แก้ยังไงก็ไม่ได้สักที ขอบคุณครับ
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 P. Christeas, Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2013 OpenERP SA. (http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from reportlab import rl_config
import logging
import glob
import os
# .apidoc title: TTF Font Table
"""This module allows the mapping of some system-available TTF fonts to
the reportlab engine.
This file could be customized per distro (although most Linux/Unix ones)
should have the same filenames, only need the code below).
Due to an awful configuration that ships with reportlab at many Linux
and Ubuntu distros, we have to override the search path, too.
"""
_logger = logging.getLogger(__name__)
CustomTTFonts = [('Angsana',"Angsana New", "THSarabun.ttf", 'normal'),
('Angsana',"Angsana New Bold", "THSarabun.ttf", 'bold'),
('Angsana',"Angsana New Italic", "THSarabun.ttf", 'italic'),
('Angsana',"Angsana New BoldItalic", "THSarabun.ttf", 'bolditalic'),
('Helvetica',"DejaVu Sans", "THSarabun.ttf", 'normal'),
('Helvetica',"DejaVu Sans Bold", "THSarabun.ttf", 'bold'),
('Helvetica',"DejaVu Sans Oblique", "THSarabun.ttf", 'italic'),
('Helvetica',"DejaVu Sans BoldOblique", "THSarabun.ttf", 'bolditalic'),
('Times',"Liberation Serif", "THSarabun.ttf", 'normal'),
('Times',"Liberation Serif Bold", "THSarabun.ttf", 'bold'),
('Times',"Liberation Serif Italic", "THSarabun.ttf", 'italic'),
('Times',"Liberation Serif BoldItalic", "THSarabun.ttf", 'bolditalic'),
('Times-Roman',"Liberation Serif", "THSarabun.ttf", 'normal'),
('Times-Roman',"Liberation Serif Bold", "THSarabun.ttf", 'bold'),
('Times-Roman',"Liberation Serif Italic", "THSarabun.ttf", 'italic'),
('Times-Roman',"Liberation Serif BoldItalic", "THSarabun.ttf", 'bolditalic'),
('Courier',"FreeMono", "THSarabun.ttf", 'normal'),
('Courier',"FreeMono Bold", "THSarabun.ttf", 'bold'),
('Courier',"FreeMono Oblique", "THSarabun.ttf", 'italic'),
('Courier',"FreeMono BoldOblique", "THSarabun.ttf", 'bolditalic'),]
# Search path for TTF files, in addition of rl_config.TTFSearchPath
TTFSearchPath = [
'/usr/share/fonts/truetype', # SuSE
'/usr/share/fonts/dejavu', '/usr/share/fonts/liberation', # Fedora, RHEL
'/usr/share/fonts/truetype/*','/usr/local/share/fonts' # Ubuntu,
'/usr/share/fonts/TTF/*', # Mandriva/Mageia
'/usr/share/fonts/TTF', # Arch Linux
'/usr/lib/openoffice/share/fonts/truetype/',
'~/.fonts',
'~/.local/share/fonts',
# mac os X - from
# http://developer.apple.com/technotes/tn/tn2024.html
'~/Library/Fonts',
'/Library/Fonts',
'/Network/Library/Fonts',
'/System/Library/Fonts',
# windows
'c:/winnt/fonts',
'c:/Windows/Fonts'
]
def list_all_sysfonts():
"""
This function returns list of font directories of system.
"""
filepath = []
# Perform the search for font files ourselves, as reportlab's
# TTFOpenFile is not very good at it.
searchpath = list(set(TTFSearchPath + rl_config.TTFSearchPath))
for dirname in searchpath:
for filename in glob.glob(os.path.join(os.path.expanduser(dirname), '*.[Tt][Tt][FfCc]')):
filepath.append(filename)
return filepath
def SetCustomFonts(rmldoc):
""" Map some font names to the corresponding TTF fonts
The ttf font may not even have the same name, as in
Times -> Liberation Serif.
This function is called once per report, so it should
avoid system-wide processing (cache it, instead).
"""
for family, font, filename, mode in CustomTTFonts:
if os.path.isabs(filename) and os.path.exists(filename):
rmldoc.setTTFontMapping(family, font, filename, mode)
return True
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 P. Christeas, Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2013 OpenERP SA. (http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from reportlab import rl_config
import logging
import glob
import os
# .apidoc title: TTF Font Table
"""This module allows the mapping of some system-available TTF fonts to
the reportlab engine.
This file could be customized per distro (although most Linux/Unix ones)
should have the same filenames, only need the code below).
Due to an awful configuration that ships with reportlab at many Linux
and Ubuntu distros, we have to override the search path, too.
"""
_logger = logging.getLogger(__name__)
CustomTTFonts = [('Angsana',"Angsana New", "THSarabun.ttf", 'normal'),
('Angsana',"Angsana New Bold", "THSarabun.ttf", 'bold'),
('Angsana',"Angsana New Italic", "THSarabun.ttf", 'italic'),
('Angsana',"Angsana New BoldItalic", "THSarabun.ttf", 'bolditalic'),
('Helvetica',"DejaVu Sans", "THSarabun.ttf", 'normal'),
('Helvetica',"DejaVu Sans Bold", "THSarabun.ttf", 'bold'),
('Helvetica',"DejaVu Sans Oblique", "THSarabun.ttf", 'italic'),
('Helvetica',"DejaVu Sans BoldOblique", "THSarabun.ttf", 'bolditalic'),
('Times',"Liberation Serif", "THSarabun.ttf", 'normal'),
('Times',"Liberation Serif Bold", "THSarabun.ttf", 'bold'),
('Times',"Liberation Serif Italic", "THSarabun.ttf", 'italic'),
('Times',"Liberation Serif BoldItalic", "THSarabun.ttf", 'bolditalic'),
('Times-Roman',"Liberation Serif", "THSarabun.ttf", 'normal'),
('Times-Roman',"Liberation Serif Bold", "THSarabun.ttf", 'bold'),
('Times-Roman',"Liberation Serif Italic", "THSarabun.ttf", 'italic'),
('Times-Roman',"Liberation Serif BoldItalic", "THSarabun.ttf", 'bolditalic'),
('Courier',"FreeMono", "THSarabun.ttf", 'normal'),
('Courier',"FreeMono Bold", "THSarabun.ttf", 'bold'),
('Courier',"FreeMono Oblique", "THSarabun.ttf", 'italic'),
('Courier',"FreeMono BoldOblique", "THSarabun.ttf", 'bolditalic'),]
# Search path for TTF files, in addition of rl_config.TTFSearchPath
TTFSearchPath = [
'/usr/share/fonts/truetype', # SuSE
'/usr/share/fonts/dejavu', '/usr/share/fonts/liberation', # Fedora, RHEL
'/usr/share/fonts/truetype/*','/usr/local/share/fonts' # Ubuntu,
'/usr/share/fonts/TTF/*', # Mandriva/Mageia
'/usr/share/fonts/TTF', # Arch Linux
'/usr/lib/openoffice/share/fonts/truetype/',
'~/.fonts',
'~/.local/share/fonts',
# mac os X - from
# http://developer.apple.com/technotes/tn/tn2024.html
'~/Library/Fonts',
'/Library/Fonts',
'/Network/Library/Fonts',
'/System/Library/Fonts',
# windows
'c:/winnt/fonts',
'c:/Windows/Fonts'
]
def list_all_sysfonts():
"""
This function returns list of font directories of system.
"""
filepath = []
# Perform the search for font files ourselves, as reportlab's
# TTFOpenFile is not very good at it.
searchpath = list(set(TTFSearchPath + rl_config.TTFSearchPath))
for dirname in searchpath:
for filename in glob.glob(os.path.join(os.path.expanduser(dirname), '*.[Tt][Tt][FfCc]')):
filepath.append(filename)
return filepath
def SetCustomFonts(rmldoc):
""" Map some font names to the corresponding TTF fonts
The ttf font may not even have the same name, as in
Times -> Liberation Serif.
This function is called once per report, so it should
avoid system-wide processing (cache it, instead).
"""
for family, font, filename, mode in CustomTTFonts:
if os.path.isabs(filename) and os.path.exists(filename):
rmldoc.setTTFontMapping(family, font, filename, mode)
return True
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
- ร้านจตุรพร
- โพสต์: 5
- ลงทะเบียนเมื่อ: พฤหัสฯ. 02 มิ.ย. 2016 12:52 pm
Re: ปัญหาการออกรายงานภาษาไทยครับ กลายเป็นตัวเหลี่ยม ใน OpenERP 7.0
สวัสดีครับ ผมใช้ odoo8 กับ openoffice 3.2
แก้ไขไฟล์ customttffont.py ก็ยังไม่หายครับ รบกวนช่วยแก้ไขให้ด้วยครับ
ขอบคุณครับ
แก้ไขไฟล์ customttffont.py ก็ยังไม่หายครับ รบกวนช่วยแก้ไขให้ด้วยครับ
ขอบคุณครับ
-
phatcharapon
- โพสต์: 30
- ลงทะเบียนเมื่อ: อังคาร 12 มี.ค. 2013 10:34 pm
Re: ปัญหาการออกรายงานภาษาไทยครับ กลายเป็นตัวเหลี่ยม ใน OpenERP 7.0
ต้องเพิ่ม font ด้วยครับ แต่ว่าที่ผมทำแล้วโอเค มันเป็น ubuntu 12.04 ถ้าให้ชัวร์ลองถามท่านแอดมิน จะชัวร์สุดครับ ตอนนั้นท่านแอดมินก็มาช่วยผม 55
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
-
การติดตั้ง OpenERP สองเวอร์ชั่นในเครื่องเดียวเช่น OpenERP 6.1 และ OpenERP 7.0
โดย openerpthailand » อังคาร 19 ก.พ. 2013 12:54 am » ใน คู่มือการติดตั้ง วิธีใช้งาน OpenERP - 2
- 10444
-
โดย cupidcool
ดูข้อความล่าสุด
ศุกร์ 07 พ.ย. 2014 11:44 am
-
-
-
เชื่อม OpenERP กับ Prestashop สอนการเชื่อม ระบบ shopping cart กับ OpenERP
โดย openerpthailand » อังคาร 30 ต.ค. 2012 4:32 am » ใน การติดตั้ง อัพเกรด Odoo / OpenERP - 0
- 1831
-
โดย openerpthailand
ดูข้อความล่าสุด
อังคาร 30 ต.ค. 2012 4:32 am
-
-
-
ติดตั้ง OPENERP V7 ใน win7 32bit แล้วฟ้อง OpenERP Apps Unreachable Showing locally available modules
โดย nond » จันทร์ 01 มิ.ย. 2015 10:52 pm » ใน การติดตั้ง อัพเกรด Odoo / OpenERP - 1
- 42390
-
โดย kitcle
ดูข้อความล่าสุด
เสาร์ 29 ส.ค. 2015 5:24 am
-
-
-
ติดตั้งโปรแกรม OpenERP 7.0 Beta แล้วขึ้น OpenERP Server Error
โดย openerp_docman » พุธ 21 พ.ย. 2012 4:05 pm » ใน Bug Report รายงานข้อผิดพลาดต่างๆ ของ Odoo / OpenERP เวอร์ชั่นต่างๆ - 2
- 2793
-
โดย openerpthailand
ดูข้อความล่าสุด
พฤหัสฯ. 22 พ.ย. 2012 4:07 pm
-
-
-
หน้าเว็บหลัก OpenERP.com เปลี่ยนรูปแบบ เป็น OpenERP 7.0 เต็มตัว
โดย openerpthailand » ศุกร์ 24 พ.ค. 2013 1:12 am » ใน Odoo / OpenERP - News & OpenERPThailand Feedback - 1
- 8084
-
โดย ไกร
ดูข้อความล่าสุด
จันทร์ 19 พ.ค. 2014 3:28 pm
-
-
-
ทีม OpenERP ทำ Module เสริม โพส ที่ OpenERP แล้วแสดง ที่ blog ได้
โดย openerpthailand » พุธ 24 ก.ค. 2013 6:52 pm » ใน Odoo / OpenERP - News & OpenERPThailand Feedback - 0
- 7743
-
โดย openerpthailand
ดูข้อความล่าสุด
พุธ 24 ก.ค. 2013 6:52 pm
-
-
-
ย้าย data บน Openerp 7(linux) ไป Openerp 7(windoows)
โดย mpo360 » พุธ 11 ก.พ. 2015 11:33 am » ใน การติดตั้ง อัพเกรด Odoo / OpenERP - 18
- 53248
-
โดย phatcharapon
ดูข้อความล่าสุด
เสาร์ 30 ก.ค. 2016 4:03 pm
-
ผู้ใช้งานขณะนี้
กำลังดูบอร์ดนี้: 2 และ บุคคลทั่วไป 0 ท่าน
Log in with LINE

