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

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

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

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

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

无法打开或新建订单



  • Hi,

    OpenERP server 5.0.16 running on Ubuntu 10.04.4 LTS

    Failed to open a purchase order or create a new purchase order in ether GTK client or web client.

    But I can still open or create an order on an old database that's backed up few days ago.

    No particular action was made, only daily running.

    Anybody has a clue ?


    Traceback (most recent call last):
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 299, in dispatch
    result = LocalService(service_name)(method, *params)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 77, in call
    return getattr(self, method)(*params)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 578, in execute
    res = service.execute(db, uid, object, method, *args)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 1394, in fields_view_get
    context)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/ir/ir_values.py", line 225, in get
    res = filter(bool, map(lambda x: _result_get(x, keys), list(result)))
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/ir/ir_values.py", line 225, in <lambda>
    res = filter(bool, map(lambda x: _result_get(x, keys), list(result)))
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/ir/ir_values.py", line 211, in _result_get
    datas = self.pool.get(model).read(cr, uid, [id], fields, context)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/hr/hr_department.py", line 71, in read
    context=context, load=load)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 2234, in read
    result = self._read_flat(cr, user, select, fields, context, load)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 2381, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/fields.py", line 672, in get
    res = self._fnct(obj, cr, user, ids, name, self._arg, context)
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/ir/ir_actions.py", line 165, in _views_get_fnc
    res[act.id].append((act.view_id.id, act.view_id.type))
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 240, in getattr
    return self[name]
    File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 236, in getitem
    return self._data[self._id][name]
    KeyError: 'type'

    猜着看像是哪个View出了问题,哪个呢?  Department ?

    Chip



  • 确实只有这么多信息可以提供了。

    由于问题突然出现,又没有明确的能够帮助解决问题的线索,已经几天时间采购这部分不能使用了,这已经影响公司的业务了。

    反思一个问题:在没有很强的技术能力的情形下,使用开源软件的风险是很大的,特别是当企业流程已经依赖这个系统以后。那么如果这种问题出现了,如何处置呢?



    Chip




  • 相同的代码,不同的数据库结果不同。要解决这样的问题只能把数据库导出来找人看一下了。
    好像是权限造成的问题,看来只能debug了。
    楼主别急,肯定能解决的。只是无法估算工作量,而且涉及公司隐私的数据,不方便放在社区里研究。



  • 谢谢Jeff,

    我知道原因了,但没有找到解决办法。

    问题是卸载PowerEmail造成的, 对于每个数据库,只要卸载这个模块就会导致同样的结果,重新安装解决不了问题。看来之这个模块修改了什么东西,卸载不能恢复到原来的状态。

    Chip



  • 手工清理模块....



  • 看来是要这样做,可否帮忙看下这个模块,给个方向。从没做过清理工作,不明白模块安装、卸载的机制。

    多谢!多谢!

    Chip



  • 如果之前所有修改都是在addons里写代码实现的,没有在数据库里做过对象、视图等自定义,可以试着更新一下base模块。
    耗时又危险,谨慎操作!



  • 打开 ir.ui.view 表. 然后 看最后的100来条记录, 与你的模块相关的记录,都删除鸟吧...


Log in to reply