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

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

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

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

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

工作流报错



  • 按照“30分钟开发OpenERP 功能模块”练习,完成工作流建模。新建课程审核报错如下:


    OpenERP close
    Your version of OpenERP is unsupported. Support & maintenance services are available here: OpenERP Entreprise.

    OpenERP Server Error

    Client Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 180, in dispatch
        response["result"] = method(controller, self, **self.params)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1059, in exec_workflow
        r = req.session.exec_workflow(model, id, signal)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/session.py", line 100, in exec_workflow
        r = self.proxy('object').exec_workflow(self._db, self._uid, self._password, model, signal, id)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
        result = self.connector.send(self.service_name, method, *args)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 608, in send
        raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)


    Server Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 593, in send
        return openerp.netsvc.dispatch_rpc(service_name, method, args)
      File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc
        result = ExportService.getService(service_name).dispatch(method, params)
      File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 586, in dispatch
        res = fn(db, uid, *params)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 121, in wrapper
        return f(self, dbname, *args, **kwargs)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 196, in exec_workflow
        res = self.exec_workflow_cr(cr, uid, obj, method, *args)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 189, in exec_workflow_cr
        return wf_service.trg_validate(uid, obj, args[0], method, cr)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/wkf_service.py", line 124, in trg_validate
        res2 = instance.validate(cr, id, ident, signal)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/instance.py", line 48, in validate
        workitem.process(cr, witem, ident, signal, force_running, stack=stack)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/workitem.py", line 61, in process
        ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/workitem.py", line 176, in _split_test
        _join_test(cr, t[0], t[1], ident, stack)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/workitem.py", line 184, in _join_test
        create(cr,[activity], inst_id, ident, stack)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/workitem.py", line 41, in create
        process(cr, res, ident, stack=stack)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/workitem.py", line 53, in process
        result = _execute(cr, workitem, activity, ident, stack)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/workitem.py", line 111, in _execute
        res2 = wkf_expr.execute_action(cr, ident, workitem, activity)
      File "/usr/lib/pymodules/python2.7/openerp/workflow/wkf_expr.py", line 64, in execute_action
        result = obj.run(cr, ident[0], [activity['action_id']], ctx)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_actions.py", line 681, in run
        body = self.merge_message(cr, uid, action.message, action, context)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_actions.py", line 614, in merge_message
        message = com.sub(merge, keystr)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_actions.py", line 607, in merge
        'time': time,
      File "/usr/lib/pymodules/python2.7/openerp/tools/safe_eval.py", line 241, in safe_eval
        return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
      File "", line 1, in <module>
      File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 478, in getattr
        raise AttributeError(e)
    AttributeError: "Field 'x_teacher' does not exist in object 'browse_record(base.language.export, 4)'"


  • 管理员

    [quote]  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_actions.py", line 614, in merge_message
        message = com.sub(merge, keystr)[/quote]
    [quote]AttributeError: "Field 'x_teacher' does not exist in object 'browse_record(base.language.export, 4)'"[/quote]

    你应该是在创建notify teacher的server action时,选择错了Object



  • 标准的开发技术是写代码,python或者xml文件

    view编辑器、model直接定义、报表编辑器这些是出具原型的辅助工具,不建议使用

    这个演讲是针对python技术人员的,采用这种演示方式是为了向已掌握python开发技术的人展示OpenERP的强大和方便,在实际项目中我们都是写模块的。

    新手不要效仿。


Log in to reply