[以解决]求助:新建订单并选择产品时,出异常
-
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。