Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. openSourceERP

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

    由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

    本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

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

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

    O
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 15
    • Best 0
    • Controversial 0
    • Groups 0

    openSourceERP

    @openSourceERP

    0
    Reputation
    601
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    openSourceERP Unfollow Follow

    Latest posts made by openSourceERP

    • PydevExtensions 破解补丁

      Eclipse下插件

      1、 fabioz.com/pydev/ 当前版本1.3.22
      用PydevPlugin.class替换 com.python.pydev_版本号 目录下pydev.jar下compythonpydev 目录下的同名文件。[attach]143[/attach]

      2、 code.google.com/p/pyanttasks/

      直接copy pyAntTasks-1.2.jar 到eclipse的ant/lib下,即可支持ant编译、运行python
      eg: D:eclipsepluginsorg.apache.ant_1.7.0.v200803061910lib
      [attach]144[/attach]

      [attach]145[/attach]

      posted in Odoo 开发与实施交流
      O
      openSourceERP
    • RE: 我的TINY ERP安装过程

      gtk--〉新建一个帐套, load demo data的checkbox不要选,即可
      GTK模式下的帐套已经不能建立???这个可能是你的tinyerp-server.conf中
      要指定数据库安装路径: pg_path = D:tiny4.2.3PostgreSQL4TinyERPbin

      posted in Odoo 新手求助
      O
      openSourceERP
    • RE: 报表求助;)

      我在订单的基础上增加了 订单类别字段,并通过 视图 创建报表,新增加的报表内容:统计销售人员 每类订单的销售总额。
      报表采用openoffice创建 contract_amount.sxw---> contract_amount.rml
      问题:
      打印报表时,debug发现数据objects已经传递到 report_sxw.repeatIn() 方法,但是获取不到它所在的父节点parentNode。
      原因:
      原 report_sxw.init_(self, cr, uid, name, parents=rml_parents, tag=rml_tag, context=None) ,此处的parents是指报表函数所在rml中的父节点名称,
      而默认tiny解析报表的默认子类, 只是传递了 super.init(cr,uid,name,context) 导致context的值赋给了parent,所以生成的报表 需要填充数据的地方为空白。正确的方法是 super.init(cr,uid,name,context=context) ,这样report_sxw 初始化就正确了(parents=rml_parents, tag=rml_tag)

      posted in Odoo 开发与实施交流
      O
      openSourceERP
    • 报表求助;)

      扩展了sale.order模块,增加了订单类别。
      通过数据库View创建Model 和 报表(统计每个销售人员的各种类型的订单总额)
      出现问题 repeatIn( objects,'o') 循环找不到 parentNode, 导致所有的报表转化为PDF时都没有填充数据;必须指定repeatIn( objects,'o','parentNodeXXX')才可以。

      和原来的各个模块貌似都没有什么差别

      posted in Odoo 开发与实施交流
      O
      openSourceERP
    • RE: PDF 报表汉化步骤

      [quote]原帖由 [i]oldrev[/i] 于 2008-10-10 14:30 发表 www.shine-it.net/redirect.php?goto=findpost&pid=1411&ptid=333
      楼上的大哥,sed 命令是错的,把 Arial Unicode MS 改成 SimSun [/quote]
      lz 果然很强。有没有openoffice的报表插件?

      posted in Odoo 开发与实施交流
      O
      openSourceERP
    • RE: PDF 报表汉化步骤

      替换的工作直接交给linux完成。

      1. 获取中文字体文件 (本例中使用 simsun.ttc (全称: "SimSun"))

      2. 复制至 tiny/bin/reportlab/fonts/
        这样你可以把字体文件拷贝到reportlab的目录下,
        这个目录是在python的安装目录下的site-package>reportlab>font目录。
        当然你将字体文件放在tiny/bin/reportlab/fonts/下也没有问题,

      3. 编辑 tiny/report/render/rml2pdf/trml2pdf.py, 插入以下代码:

      encoding = 'UTF-8'

      from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
      from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle, StyleSheet1

      def getZhSampleStyleSheet():
      """Returns a chinese stylesheet object"""
      stylesheet = StyleSheet1()
      stylesheet.add(ParagraphStyle(name='Normal',fontName='SimSun',fontSize=10,leading=12))
      stylesheet.add(ParagraphStyle(name='BodyText',parent=stylesheet['Normal'],spaceBefore=6))
      stylesheet.add(ParagraphStyle(name='Italic',parent=stylesheet['BodyText'],fontName='SimSun'))
      stylesheet.add(ParagraphStyle(name='Heading1',parent=stylesheet['Normal'],fontName='SimSun',fontSize=18,leading=22,spaceAfter=6),alias='h1')

       stylesheet.add(ParagraphStyle(name='Title',parent=stylesheet['Normal'],fontName='SimSun',fontSize=18,leading=22,alignment=TA_CENTER,spaceAfter=6),alias='title')
       stylesheet.add(ParagraphStyle(name='Heading2',parent=stylesheet['Normal'],fontName='SimSun',fontSize=14,leading=18,spaceBefore=12,spaceAfter=6),alias='h2')
       stylesheet.add(ParagraphStyle(name='Heading3',parent=stylesheet['Normal'],fontName='SimSun',fontSize=12,leading=14,spaceBefore=12,spaceAfter=6),alias='h3')
       stylesheet.add(ParagraphStyle(name='Bullet',parent=stylesheet['Normal'],firstLineIndent=0,spaceBefore=3),alias='bu')
       stylesheet.add(ParagraphStyle(name='Definition',parent=stylesheet['Normal'],firstLineIndent=0,leftIndent=36,bulletIndent=0,spaceBefore=6,bulletFontName='SimSun'),alias='df')
       stylesheet.add(ParagraphStyle(name='Code',parent=stylesheet['Normal'],fontName='SimSun',fontSize=8,leading=8.8,firstLineIndent=0,leftIndent=36))
       return stylesheet
      
      1. 在同样的文件中搜索 reportlab.lib.styles.getSampleStyleSheet() 用 getZhSampleStyleSheet() 替换(共六处)

      2. 编辑 tiny/report/render/rml2pdf/init.py, 插入以下代码:

      #add by chenzp
      from reportlab.lib.fonts import addMapping
      from reportlab.pdfbase import pdfmetrics
      from reportlab.pdfbase.ttfonts import TTFont
      from reportlab.pdfbase.cidfonts import UnicodeCIDFont, findCMapFile
      from reportlab.lib.fonts import addMapping

      pdfmetrics.registerFont(UnicodeCIDFont('STSong-Light'))
      pdfmetrics.registerFont(TTFont('SimSun','simsun.ttc'))
      pdfmetrics.registerFont(TTFont('SimHei','simhei.ttf'))
      pdfmetrics.registerFont(TTFont('SimKai','SIMKAI.TTF'))
      pdfmetrics.registerFont(TTFont('SimFang','SIMFANG.TTF'))
      pdfmetrics.registerFont(TTFont('SimLi','SIMLI.TTF'))
      pdfmetrics.registerFont(TTFont('SimYou','SIMYOU.TTF'))

      for facename in ['SimSun','SimHei','SimKai','SimFang','SimLi','SimYou']:
      addMapping(facename, 0, 0, facename) #normal
      addMapping(facename, 0, 1, facename) #italic
      addMapping(facename, 1, 0, facename) #bold
      addMapping(facename, 1, 1, facename) #italic and bold

      6.回到tinyerp的安装目录 。使用以下命令使所有的报表使用SimSun 字体:

      sed -i 's/Times-Roman/SimSun/g' find ./addons -name "*.rml"
      sed -i 's/Times-BoldItalic/SimSun/g' find ./addons -name "*.rml"
      sed -i 's/Times-Bold/SimSun/g' find ./addons -name "*.rml"
      sed -i 's/Times-Italic/SimSun/g' find ./addons -name "*.rml"
      sed -i 's/Helvetica-BoldOblique/SimSun/g' find ./addons -name "*.rml"

      sed -i 's/Helvetica-BoldOblique/SimSun/g' find ./addons -name "*.xsl"
      sed -i 's/Helvetica-Bold/SimSun/g' find ./addons -name "*.rml"
      sed -i 's/Helvetica-Bold/SimSun/g' find ./addons -name "*.xsl"
      sed -i 's/Helvetica-Oblique/SimSun/g' find ./addons -name "*.xsl"

      sed -i 's/Helvetica/SimSun/g' find ./addons -name "*.rml"
      sed -i 's/Helvetica/SimSun/g' find ./addons -name "*.xsl"
      sed -i 's/Courier-Bold/SimSun/g' find ./addons -name "*.rml"
      sed -i 's/Courier/SimSun/g' find ./addons -name "*.xsl"
      sed -i 's/Courier/SimSun/g' find ./addons -name "*.rml"

      搞定!

      [[i] 本帖最后由 openSourceERP 于 2008-10-13 13:58 编辑 [/i]]

      posted in Odoo 开发与实施交流
      O
      openSourceERP
    • RE: Open ERP 英文版已经发布,中文翻译事宜

      估计作者想用来创收的,开源也需要收入。

      posted in Odoo 新闻
      O
      openSourceERP
    • 中文pdf报表设置后,启动tiny出现以下错误

      按照wiki中的[ www.shine-it.net/wiki/index.php?title=Tiny_ERP_%E4%B8%AD%E6%96%87pdf%E6%8A%A5%E8%A1%A8%E8%AE%BE%E7%BD%AE ]中文pdf报表设置后,启动tiny出现以下错误,请教是哪里出现了问题?

      Traceback (most recent call last):
      File "./tinyerp-server.py", line 163, in <module>
      import osv, workflow, report, service
      File "/usr/local/lib/python2.5/site-packages/tinyerp-server/report/init.py", line 29, in <module>
      import interface
      File "/usr/local/lib/python2.5/site-packages/tinyerp-server/report/interface.py", line 41, in <module>
      import render
      File "/usr/local/lib/python2.5/site-packages/tinyerp-server/report/render/init.py", line 30, in <module>
      from rml import rml, rml2html
      File "/usr/local/lib/python2.5/site-packages/tinyerp-server/report/render/rml.py", line 30, in <module>
      import rml2pdf
      File "/usr/local/lib/python2.5/site-packages/tinyerp-server/report/render/rml2pdf/init.py", line 52, in <module>
      pdfmetrics.registerFont(TTFont('Arial Unicode MS','arialuni.ttf'))
      File "/usr/local/lib/python2.5/site-packages/reportlab/pdfbase/ttfonts.py", line 989, in init
      self.face = TTFontFace(filename, validate=validate, subfontIndex=subfontIndex)
      File "/usr/local/lib/python2.5/site-packages/reportlab/pdfbase/ttfonts.py", line 898, in init
      TTFontFile.init(self, filename, validate=validate, subfontIndex=subfontIndex)
      File "/usr/local/lib/python2.5/site-packages/reportlab/pdfbase/ttfonts.py", line 412, in init
      self.extractInfo(charInfo)
      File "/usr/local/lib/python2.5/site-packages/reportlab/pdfbase/ttfonts.py", line 555, in extractInfo
      self.seek_table("post")
      File "/usr/local/lib/python2.5/site-packages/reportlab/pdfbase/ttfonts.py", line 306, in seek_table
      self._pos = self.get_table_pos(tag)[0] + offset_in_table
      File "/usr/local/lib/python2.5/site-packages/reportlab/pdfbase/ttfonts.py", line 291, in get_table_pos
      offset = self.table[tag]['offset']
      KeyError: 'post'

      posted in Odoo 开发与实施交流
      O
      openSourceERP
    • RE: Tiny源码安装问题[已解决]

      谢谢ds的解答,我使用rpm包安装。升级了glibc-2.8-8
      [[email protected] python2.5]$ rpm -qa |grep glibc
      glibc-headers-2.8-8
      glibc-2.8-8
      glibc-kernheaders-2.4-9.1.87
      glibc-common-2.8-8
      glibc-devel-2.8-8

      安装了[[email protected] python2.5]$ rpm -qa |grep libx
      libxml2-2.6.27-1
      libxslt-1.1.24-2.fc9
      libxml2-devel-2.6.27-1
      终于解决了上面的问题。

      [[i] 本帖最后由 openSourceERP 于 2008-9-4 17:27 编辑 [/i]]

      posted in Odoo 安装指南
      O
      openSourceERP
    • RE: Tiny源码安装问题[已解决]

      在red Hat 下安装了libxml2-2.6.31和 libxslt-1.1.24包,但是还是出现上面的错误。
      请教还有其他方法可以解决吗?谢谢

      posted in Odoo 安装指南
      O
      openSourceERP