Odoo中文社区可以通过以下三个域名访问:shine-it.net , odoocn.org,odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

Oecn_base_fonts 使用说明(解决v.7.0,v6.1,V6.0.x的PDF中文字体方框问题,支持CJK语言)


  • 管理员

    已经更新了模块,还是沿用四种字体配置方式,配置更灵活。<br />详情请看博客 http://cn.openerp.cn/openerp_v7_oecn_base_fonts/



  • 我使用GreenOpenERP-6.1-1版,安装成功,配置的时候(第3步)报错: 您的 OpenERP 版本没有包含支持。支持与维护服务在此处可以购买:模型”%s“的字段. <br />这个模块需要付费吗? 还是因为使用Green版的问题。


  • 管理员

    模块完全免费。错误详情需要你提供server-log才能知道<br />



  • [quote author=Joshua link=topic=2791.msg17643#msg17643 date=1374112404]<br />模块完全免费。错误详情需要你提供server-log才能知道<br />[/quote]<br />经过几日的倒腾,发现Win7 64位版本无法安装, Win7 32位和Win2003 32位都没问题。 错误日志非常蛋疼,没有发现有价值的信息。<br /><br />2013-07-25 10:31:56,966 948 INFO test openerp.modules.module: module oec<br />n_base_fonts: creating or updating database tables<br />2013-07-25 10:31:57,385 948 INFO test openerp.modules.loading: module oe<br />cn_base_fonts: loading oecn_font_installer.xml<br />2013-07-25 10:32:16,944 948 ERROR test openerp.addons.base.ir.ir_ui_view<br />: Can't render view  for model: oecn.font.installer<br />Traceback (most recent call last):<br />  File "c:\temp\OpenERP\OpenERP\openerp\addons\base\ir\ir_ui_view.py", line 126, in _check<br />_render_view<br />    fvg = self.pool.get(view.model).fields_view_get(cr, uid, view_id=view.id, view_type=vi<br />ew.type, context=context)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 2260, in fields_view_get<br />    xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=<br />ctx)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 1913, in __view_look_dom_arch<br />    fields_def = self.__view_look_dom(cr, user, node, view_id, False, fields, context=cont<br />ext)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 1859, in __view_look_dom<br />    fields.update(self.__view_look_dom(cr, user, f, view_id, in_tree_view, model_fields, c<br />ontext))<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 1859, in __view_look_dom<br />    fields.update(self.__view_look_dom(cr, user, f, view_id, in_tree_view, model_fields, c<br />ontext))<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 1776, in __view_look_dom<br />    xarch, xfields = relation.__view_look_dom_arch(cr, user, f, view_id, ctx)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 1912, in __view_look_dom_arch<br />    fields = self.fields_get(cr, user, None, context)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 3514, in fields_get<br />    res[f] = fields.field_to_dict(self, cr, user, field, context=context)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\fields.py", line 1525, in field_to_dict<br />    res['selection'] = field.selection(model, cr, user, context)<br />  File "c:\temp\OpenERP\OpenERP\openerp\addons\oecn_base_fonts\oecn_font_installer.py", li<br />ne 54, in get_system_fonts<br />    return self._system_fonts_get(cr, uid)<br />  File "c:\temp\OpenERP\OpenERP\openerp\addons\oecn_base_fonts\oecn_font_installer.py", li<br />ne 69, in _system_fonts_get<br />    ff.search()<br />  File "c:\temp\OpenERP\OpenERP\python\lib\site-packages\reportlab\lib\fontfinder.py", lin<br />e 259, in search<br />    font = TTFontFile(fileName,validate=self.validate)<br />  File "c:\temp\OpenERP\OpenERP\python\lib\site-packages\reportlab\pdfbase\ttfonts.py", li<br />ne 413, in init<br />    self.extractInfo(charInfo)<br />  File "c:\temp\OpenERP\OpenERP\python\lib\site-packages\reportlab\pdfbase\ttfonts.py", li<br />ne 473, in extractInfo<br />    A(chr(char))<br />ValueError: chr() arg not in range(256)<br />2013-07-25 10:32:17,247 948 ERROR test openerp.tools.convert: Parse erro<br />r in file:///c:/temp/OpenERP/OpenERP/openerp/addons/oecn_base_fonts/oecn_font_installer.xm<br />l:5:<br /><record id="view_font_configuration_installer" model="ir.ui.view"><br />            <field name="name">oecn.font.installer.form</field><br />            <field name="model">oecn.font.installer</field><br />            <field name="inherit_id" ref="base.res_config_installer"/><br />            <field name="arch" type="xml"><br />                <data><form position="attributes" version="7.0"><br />                    <attribute name="string">Customer Font Mapping Configuration</attribut<br />e><br />                </form><br />                <footer position="replace"><br />                    <footer><br />                      <button name="action_next" type="object" string="Continue" class="oe<br />_highlight"/><br />                    </footer><br />                </footer><br />                <separator string="title" position="replace"><br />                    <p class="oe_grey"><br />                        Fonts used in the default report may not support the characters in<br /> your lanuage. Use the setting here to replace the Original font with the font you choose.<br /><br />                    </p><br />                    <group><br />                        <field name="wrap" class="oe_inline"/><br />                        <field name="map_ids" nolabel="1" colspan="4"><br />                        <tree string="Font replace" editable="top"><br />                            <field name="pdf_font"/><br />                            <field name="new_font" on_change="onchange_new_font(new_font)"<br />/><br />                            <field name="name"/><br />                        </tree><br />                    </field><br />                    </group><br />                </separator><br />            </data></field><br />        </record><br />Traceback (most recent call last):<br />  File "c:\temp\OpenERP\OpenERP\openerp\tools\convert.py", line 847, in parse<br />    self._tags[rec.tag](self.cr, rec, n)<br />  File "c:\temp\OpenERP\OpenERP\openerp\tools\convert.py", line 814, in _tag_record<br />    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res,<br /> rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mod<br />e=self.mode, context=rec_context )<br />  File "c:\temp\OpenERP\OpenERP\openerp\addons\base\ir\ir_model.py", line 963, in _update<br />    res_id = model_obj.create(cr, uid, values, context=context)<br />  File "c:\temp\OpenERP\OpenERP\openerp\addons\base\ir\ir_ui_view.py", line 103, in create<br /><br />    return super(view, self).create(cr, uid, values, context)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 4470, in create<br />    self._validate(cr, user, [id_new], context)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\orm.py", line 1544, in _validate<br />    raise except_orm('ValidateError', '\n'.join(error_msgs))<br />except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid<br /> XML for View Architecture!')<br />2013-07-25 10:32:17,558 948 ERROR test openerp.netsvc: ValidateError<br />Error occurred while validating the field(s) arch: Invalid XML for View Architecture!<br />Traceback (most recent call last):<br />  File "c:\temp\OpenERP\OpenERP\openerp\netsvc.py", line 292, in dispatch_rpc<br />    result = ExportService.getService(service_name).dispatch(method, params)<br />  File "c:\temp\OpenERP\OpenERP\openerp\service\web_services.py", line 626, in dispatch<br />    res = fn(db, uid, *params)<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\osv.py", line 188, in execute_kw<br />    return self.execute(db, uid, obj, method, *args, **kw or {})<br />  File "c:\temp\OpenERP\OpenERP\openerp\osv\osv.py", line 144, in wrapper<br />    raise except_osv(inst.name, inst.value)<br />except_osv: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid<br /> XML for View Architecture!')<br />2013-07-25 10:32:17,647 948 INFO test werkzeug: 127.0.0.1 - - [25/Jul/20<br />13 10:32:17] "POST /web/dataset/call_button HTTP/1.1" 200 -<br />2013-07-25 10:32:18,003 948 INFO ? werkzeug: 127.0.0.1 - - [25/Jul/2013<br />10:32:18] "GET /web/static/src/img/warning.png HTTP/1.1" 200 -<br />



  •   File "reportlab\pdfbase\ttfonts.pyc", line 413, in init<br />  File "reportlab\pdfbase\ttfonts.pyc", line 473, in extractInfo<br />ValueError: chr() arg not in range(256)<br /><br />在windows 下, 出现这个错误是由于安装了其他中文字体,删除后通过。



  • [quote author=wangbuke link=topic=2791.msg14384#msg14384 date=1362545060]<br />oecn_base_fonts 无法找到字体的一种解决方案<br /><br />环境:<br />Aliyun CentOS 6.3 <br />Python 2.7.3 (源码编译安装)<br />reportlab 2.6 (源码默认编译安装)<br /><br />查看reportlab模块路径<br /># python -c "import reportlab; print reportlab.file"<br />/opt/python2.7/lib/python2.7/site-packages/reportlab/init.pyc<br /><br /># cd /opt/python2.7/lib/python2.7/site-packages/reportlab<br /><br />创建目录,如有fonts目录则跳过<br /># mkdir fonts <br /><br />复制字体文件<br /># cp wqy-zenhei.ttc ./fonts<br /><br />重启 OE , done!<br />[/quote]<br />这个文泉倚字体免费,不错。



  • OE8无法用吗,如何搞?GreenOpenERP绿色包。<br />oecn_base_fonts-trunk.2.1.1<br /><br />Traceback (most recent call last):<br />  File "/opt/OpenERP-wms/openerp/http.py", line 470, in dispatch<br />    result = self._call_function(**self.params)<br />  File "/opt/OpenERP-wms/openerp/http.py", line 294, in _call_function<br />    return checked_call(self.db, *args, **kwargs)<br />  File "/opt/OpenERP-wms/openerp/service/model.py", line 113, in wrapper<br />    return f(dbname, *args, **kwargs)<br />  File "/opt/OpenERP-wms/openerp/http.py", line 291, in checked_call<br />    return self.endpoint(*a, **kw)<br />  File "/opt/OpenERP-wms/openerp/http.py", line 638, in call<br />    return self.method(*args, **kw)<br />  File "/opt/OpenERP-wms/openerp/http.py", line 337, in response_wrap<br />    response = f(*args, **kw)<br />  File "/opt/OpenERP-wms/openerp/addons/web/controllers/main.py", line 1246, in call_button<br />    action = self._call_kw(model, method, args, {})<br />  File "/opt/OpenERP-wms/openerp/addons/web/controllers/main.py", line 1234, in _call_kw<br />    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)<br />  File "/opt/OpenERP-wms/openerp/addons/base/module/module.py", line 428, in button_immediate_install<br />    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)<br />  File "/opt/OpenERP-wms/openerp/addons/base/module/module.py", line 479, in _button_immediate_function<br />    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)<br />  File "/opt/OpenERP-wms/openerp/modules/registry.py", line 298, in new<br />    openerp.modules.load_modules(registry._db, force_demo, status, update_module)<br />  File "/opt/OpenERP-wms/openerp/modules/loading.py", line 339, in load_modules<br />    loaded_modules, update_module)<br />  File "/opt/OpenERP-wms/openerp/modules/loading.py", line 243, in load_marked_modules<br />    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)<br />  File "/opt/OpenERP-wms/openerp/modules/loading.py", line 155, in load_module_graph<br />    init_module_models(cr, package.name, models)<br />  File "/opt/OpenERP-wms/openerp/modules/module.py", line 237, in init_module_models<br />    result = obj._auto_init(cr, {'module': module_name})<br />  File "/opt/OpenERP-wms/openerp/osv/orm.py", line 2899, in _auto_init<br />    cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, k, get_pg_type(f)[1]))<br />TypeError: 'NoneType' object has no attribute 'getitem'<br />


  • 管理员

    OE8已经内置了一个类似的字体替换方法,不需要安装这个模块了。等V8发布,全部是Qweb报表就更用不着替换字体了。<br /><br />



  • [quote author=xu_xinyu link=topic=2791.msg11941#msg11941 date=1348382308]<br />安装本模块成功,但是在工时表的报表中还有部分中文显示不出来。另外在生成报表的页面有乱码。请教楼主如何解决?<br />[/quote]你好,请问你是怎么解决的呢?我也出现了这样的问题



  • odoo8.0 已经不用此模块 见: http://shine-it.net/index.php/topic,16538.0.html


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待