← Back to team overview

openerp-india team mailing list archive

[Bug 1312612] [NEW] Error trying to find warehouse_id when point_of_sale is not installed

 

Public bug reported:

Install sales module, then try to make a quotation or sales order.
Create a line with a product. Then, press in the little button at the
right of the product name (the arrow exiting from the box) to open its
form. OpenERP throws this:

OpenERP Server Error

Client Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1128, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1114, in _call_kw
    records = req.session.model(model).read(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3679, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3788, 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 1145, 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 357, 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 218, in get_product_available
    warehouse_id = shop_obj.read(cr, uid, int(context['shop']), ['warehouse_id'])['warehouse_id'][0]
KeyError: 'warehouse_id'

It doesn't make sense because there was no configuration of several
warehouses or shops. I had to install those modules and configure it and
install point_of_sale to fix this, but those are unnecessary for my
business.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1312612

Title:
  Error trying to find warehouse_id when point_of_sale is not installed

Status in OpenERP Addons (modules):
  New

Bug description:
  Install sales module, then try to make a quotation or sales order.
  Create a line with a product. Then, press in the little button at the
  right of the product name (the arrow exiting from the box) to open its
  form. OpenERP throws this:

  OpenERP Server Error

  Client Traceback (most recent call last):
    File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
      response["result"] = method(self, **self.params)
    File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1128, in call_kw
      return self._call_kw(req, model, method, args, kwargs)
    File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1114, in _call_kw
      records = req.session.model(model).read(*args, **kwargs)
    File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, in proxy
      result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
    File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method
      result = self.session.send(self.service_name, method, *args)
    File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send
      raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

  
  Server Traceback (most recent call last):
    File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send
      return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch
      res = fn(db, uid, *params)
    File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
    File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3679, in read
      result = self._read_flat(cr, user, select, fields, context, load)
    File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3788, 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 1145, 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 357, 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 218, in get_product_available
      warehouse_id = shop_obj.read(cr, uid, int(context['shop']), ['warehouse_id'])['warehouse_id'][0]
  KeyError: 'warehouse_id'

  It doesn't make sense because there was no configuration of several
  warehouses or shops. I had to install those modules and configure it
  and install point_of_sale to fix this, but those are unnecessary for
  my business.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1312612/+subscriptions


Follow ups

References