跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

I

iplan

@iplan
关于
帖子
40
主题
6
群组
0
粉丝
0
关注
0

帖子

最新 最佳 有争议的

  • OpenERP Relatorio ODT 报表模块
    I iplan

    这个报表速度快多了,也没有中文的问题,很好

    但__init__里的路径写死了,换了环境有可能报错:
    sxw_path = os.path.realpath("bin/addons/" + report_xml.report_sxw)

    我的建议是引入配置文件,改成如下:
    from tools.config import config

    adp = os.path.abspath(config['addons_path'])
    sxw_path = os.path.normcase(os.path.join(adp,report_xml.report_sxw))

    另外我发现这个模板不仅仅支持字段指令,也支持${o.name}这种形式
    在某些循环(例如动态增加表格列的循环)里后者表现更好


  • OpenERP Relatorio ODT 报表模块
    I iplan

    测试情况还不错
    但是同时打印多条记录的话,不会自动每条记录打印一页,而是顺序打印
    不知有何好办法


  • OpenERP Relatorio ODT 报表模块
    I iplan

    setLang、formatLang等函数好像不能用
    user、company变量也不能用


  • OpenERP Relatorio ODT 报表模块
    I iplan

    支持。。。
    我在windows环境下测试,python2.5
    能出来结果,但debug时后台报错:

    no module name yaml

    安装yaml后,报另一个错:

    D:Python25libsite-packagesrelatorio-0.5.1-py2.5.eggrelatoriotemplates__init__.py:31: UserWarning: Unable to load plugin 'chart', you will not be able to use it
    "to use it" % name)
    Original traceback

    Traceback (most recent call last):
    File "d:python25libsite-packagesrelatorio-0.5.1-py2.5.eggrelatoriotemplates__init__.py", line 28, in <module>
    import('relatorio.templates.%s' % name)
    File "d:python25libsite-packagesrelatorio-0.5.1-py2.5.eggrelatoriotemplateschart.py", line 33, in <module>
    import cairo
    File "D:Python25Libsite-packagescairo__init__.py", line 1, in <module>
    from _cairo import *
    ImportError: DLL load failed: �Ҳ���ָ����ģ�顣


  • 销售订单-出库单流程改进
    I iplan

    支持并期待


  • Field tag里的groups是什么作用?
    I iplan

    这个是跟权限有关的
    说明这个field只有这个组的用户才能看到


  • 帮忙测试下eval的问题
    I iplan

    应该是格式问题,windows换行符多了个回车
    用dos2unix转一下就可以了

    但这样还真麻烦

    谢谢了


  • 帮忙测试下eval的问题
    I iplan

    怎么样转的码?我试试


  • 帮忙测试下eval的问题
    I iplan

    python test.py


  • 帮忙测试下eval的问题
    I iplan

    我自己新建了个模块,可是碰到了奇怪的问题
    在windows可以正常更新模块列表并安装它,在centos下却不行,找不到这个新增的模块
    跟踪了下代码,发现是module.py中的get_module_info函数的这一行代码:

    info = eval(data)
    

    这行代码将读取到的模块__terp__.py文件的内容转换成dict,
    在不同环境下下,可能正常,也可能报错
    我的环境:
    windows: xp, python2.5.4
    linux: centos5.3, python2.4.3

    我特意做了个测试文件,在windows下ok,在linux下报错
    实在是郁闷
    我把测试文件传上来,请有条件的朋友帮忙测试下


  • 报表中数据行的翻译
    I iplan

    还修改什么语言文件?
    在PO里都翻译了啊,不过翻译的是其标签,数据能翻译吗?
    这些对应的字段在client里可以正常显示中文
    在报表里不能
    我发现这些字段都是selection类型的


  • 报表中数据行的翻译
    I iplan

    报表中标题什么的都可以中文化
    但是有些数据不知道怎么才能汉化
    比如说状态字段,只能显示assigned,draft这样的值
    不知可以有什么方法可以解决这个问题


  • PDF 报表中文支持模块:base_report_cn
    I iplan

    [quote]原帖由 [i]sagas[/i] 于 2009-6-23 21:51 发表 shine-it.net/tinyerp/redirect.php?goto=findpost&pid=2402&ptid=447
    改掉了也许是因为源代码的一处低级错误。 [/quote]

    慎重....
    这样改其他报表可能会报错


  • PDF 报表中文支持模块:base_report_cn
    I iplan

    [quote]原帖由 [i]sagas[/i] 于 2009-6-20 17:50 发表 shine-it.net/tinyerp/redirect.php?goto=findpost&pid=2326&ptid=447
    我使用产品的“product cost structure”,打印出来的文档标题倒是支持中文了,但是各BOM项还是方块的。奇怪的是这个模块安装之后不能卸载。 [/quote]

    这个不是报表模块的原因
    是因为这个报表是xsl报表,在xsl没有定义表头和明细的字体名字,标题定义了所以能显示中文


  • 为openerp-server建立service
    I iplan

    touch /var/log/openerp-server.log

    chown openerp /var/log/openerp-server.log

    启动服务:
    #/etc/init.d/openerp-server start
    关闭服务:
    #/etc/init.d/openerp-server stop

    [[i] 本帖最后由 iplan 于 2009-6-22 14:49 编辑 [/i]]


  • 为openerp-server建立service
    I iplan

    补充一点,我这里是将 /usr/bin/openerp-server改名成了 start-openerp-server


  • 为openerp-server建立service
    I iplan

    在/etc/init.d下建立文件openerp-server
    如果安装了openerp-web,可将openerp-web复制过来修改
    内容大致如下:
    #!/bin/sh

    BEGIN INIT INFO

    Provides: openerp-server

    Required-Start: $syslog

    Required-Stop: $syslog

    Should-Start: $network

    Should-Stop: $network

    Default-Start: 2 3 4 5

    Default-Stop: 0 1 6

    Short-Description: OpenERP Server - the Server of the OpenERP

    Description: OpenERP is a complete ERP and CRM software.

    END INIT INFO

    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    DAEMON=/usr/bin/start-openerp-server
    NAME=openerp-server
    DESC=openerp-server

    Specify the user name (Default: terp).

    USER="openerp"

    logfile

    LOGFILE="/var/log/openerp-server.log"

    pidfile

    PIDFILE=/var/run/$NAME.pid

    Additional options that are passed to the Daemon.

    DAEMON_OPTS="--logfile $LOGFILE"

    [ -x $DAEMON ] || exit 0
    [ -f $CONFIGFILE ] || exit 0

    checkpid() {
    [ -f $PIDFILE ] || return 1
    pid=cat $PIDFILE
    [ -d /proc/$pid ] && return 0
    return 1
    }

    do_start() {
    $DAEMON $DAEMON_OPTS > /dev/null 2>&1 &

    RETVAL=$?
    sleep 5         # wait for few seconds
    
    echo $! &gt; $PIDFILE  # create pidfile
    
    return $RETVAL
    

    }

    do_stop() {

    pid=`cat $PIDFILE`
    kill -15 $pid
    
    RETVAL=$?
    sleep 2         # wait for few seconds
    rm -f $PIDFILE  # remove pidfile
    
    return $RETVAL
    

    }

    do_restart() {

    if [ -f $PIDFILE ]; then
        do_stop
    fi
    
    do_start
    
    return $?
    

    }

    start_daemon() {

    if [ -f $PIDFILE ]; then
        echo "pidfile already exists: $PIDFILE"
        exit 1
    fi
    
    echo -n "Starting $DESC: "
    
    do_start
    
    checkpid
    
    if [ $? -eq 1 ]; then
        rm -f $PIDFILE
        echo "failed."
        exit 1
    fi
    
    echo "done."
    

    }

    stop_daemon() {

    checkpid
    
    if [ $? -eq 1 ]; then
        exit 0
    fi
    
    echo -n "Stopping $DESC: "
    
    do_stop
    
    if [ $? -eq 1 ]; then
        echo "failed."
        exit 1
    fi
    
    echo "done."
    

    }

    restart_daemon() {

    echo -n "Reloading $DESC: "
    
    do_restart
    
    checkpid
    
    if [ $? -eq 1 ]; then
        rm -f $PIDFILE
        echo "failed."
        exit 1
    fi
    
    echo "done."
    

    }

    status_daemon() {

    echo -n "Checking $DESC: "
    
    checkpid
    
    if [ $? -eq 1 ]; then
        echo "stopped."
    else
        echo "running."
    fi
    

    }

    case "$1" in
    start) start_daemon ;;
    stop) stop_daemon ;;
    restart|force-reload) restart_daemon ;;
    status) status_daemon ;;
    *)
    N=/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
    exit 1
    ;;
    esac

    exit 0

    vim: sts=4 st=4 et


  • 为openerp-server建立service
    I iplan

    OS:CentOS 5.3
    Python:2.4.3

    参考openerp-web的做法


  • 幾個安裝上的問題
    I iplan

    1、python2.6 setup.py install就行
    2、启动可以带参数,参数说明 openerp-server --help自己看, openerp-server -s 可以保存设置到~/.openerprc-server,一般开始只需指定 db_user,db_password ,db_port参数值
    3、正确
    4、不用那么麻烦,直接用客户端建立帐套


  • 请测试一下GTK客户端
    I iplan

    import time
    time.tzname

    centos 5.3 python2.4.3
    测试结果:
    ('CST','CST')

  • 登录

  • 没有帐号? 注册

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组