Skip to content

Error devolucion

llunaCreixent requested to merge error-devolucion into compra-en-deposito

Error when returning sales deposit:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/odoo/models.py", line 5101, in ensure_one
    _id, = self._ids
ValueError: not enough values to unpack (expected 1, got 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/opt/odoo/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 1343, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/main.py", line 1331, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 387, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 374, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo_modules/devcontrol_modules/odoo/addons/gestion_editorial/models/liquidacion_descontrol.py", line 280, in post_y_devolver
    new_stock_picking_data = return_picking.create_returns()
  File "/opt/odoo/addons/stock/wizard/stock_picking_return.py", line 175, in create_returns
    new_picking_id, pick_type_id = wizard._create_returns()
  File "/opt/odoo/addons/delivery/models/stock_picking.py", line 249, in _create_returns
    new_picking, pick_type_id = super(StockReturnPicking, self)._create_returns()
  File "/opt/odoo/addons/stock_account/wizard/stock_picking_return.py", line 18, in _create_returns
    new_picking_id, pick_type_id = super(StockReturnPicking, self)._create_returns()
  File "/opt/odoo/addons/stock/wizard/stock_picking_return.py", line 126, in _create_returns
    'location_dest_id': self.location_id.id})
  File "/opt/odoo/odoo/models.py", line 4661, in copy
    self.ensure_one()
  File "/opt/odoo/odoo/models.py", line 5104, in ensure_one
    raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: stock.picking()

Merge request reports

Loading