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

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

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

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

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

[以解决]求助:新建订单并选择产品时,出异常



  • ERP6.1 新建订单,在销售明显中添加产品是,ERP出错,异常信息如下:
    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 1032, in onchange
        result = self.call_common(req, model, method, args, context_id=context_id)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 996, in call_common
        return self._call_kw(req, model, method, args, {})
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1010, in _call_kw
        return getattr(req.session.model(model), method)(*args, **kwargs)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
        args, kw)
      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 167, in execute_kw
        return self.execute(db, uid, obj, method, *args, **kw or {})
      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 176, in execute
        res = self.execute_cr(cr, uid, obj, method, *args, **kw)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 164, in execute_cr
        return getattr(object, method)(cr, uid, *args, **kw)
      File "/usr/lib/pymodules/python2.7/openerp/addons/sale/sale.py", line 1283, in product_id_change
        compare_qty = float_compare(product_obj.virtual_available * uom2.factor, qty * product_obj.uom_id.factor, precision_rounding=product_obj.uom_id.rounding)
      File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 476, in getattr
        return self[name]
      File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 391, in getitem
        field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
      File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3416, in read
        result = self._read_flat(cr, user, select, fields, context, load)
      File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3527, in _read_flat
        res2 = self._columns[val[0]].get(cr, self, ids, val, user, context=context, values=res)
      File "/usr/lib/pymodules/python2.7/openerp/osv/fields.py", line 1129, in get
        result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
      File "/usr/lib/pymodules/python2.7/openerp/addons/stock/product.py", line 332, in _product_available
        stock = self.get_product_available(cr, uid, ids, context=c)
      File "/usr/lib/pymodules/python2.7/openerp/addons/stock/product.py", line 198, in get_product_available
        warehouse_id = shop_obj.read(cr, uid, int(context['shop']), ['warehouse_id'])['warehouse_id'][0]
    TypeError: 'bool' object has no attribute 'getitem'

    请大侠指点下,本人较懂python,但不熟悉openerp。



  • 给你的商店添加一个仓库...



  • 谢谢楼上的大哥!
    已经针对每个仓库,都新建了一个商店,还是出同样的问题!另外,确认销售订单时,也会出异常!
    怎么办???


  • 管理员

    把截商店的表单视图来看看?



  • ;D。。。
    谢谢啊!销售订单那里选择对应的商店就可以了!


Log in to reply