Skip to Content
Menu
This question has been flagged
1708 Views

When I tired to close the pos and close the session and post the entries ?  I am using Odoo V 15  EDITION Community

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/models.py", line 5178, in ensure_one
_id, = self._ids
ValueError: too many values to unpack (expected 1)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/odoo/odoo-server/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1336, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1324, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/odoo-server/addons/point_of_sale/models/pos_session.py", line 293, in action_pos_session_closing_control
return session.action_pos_session_validate(balancing_account, amount_to_balance, bank_payment_method_diffs)
File "/odoo/odoo-server/addons/point_of_sale/models/pos_session.py", line 304, in action_pos_session_validate
return self.action_pos_session_close(balancing_account, amount_to_balance, bank_payment_method_diffs)
File "/odoo/odoo-server/addons/point_of_sale/models/pos_session.py", line 312, in action_pos_session_close
return self._validate_session(balancing_account, amount_to_balance, bank_payment_method_diffs)
File "/odoo/odoo-server/addons/point_of_sale/models/pos_session.py", line 353, in _validate_session
self.env['pos.order'].search([('session_id', '=', self.id), ('state', '=', 'paid')]).write({'state': 'done'})
File "/odoo/custom/addons/pos_home_delivery/models/pos.py", line 68, in write
if self.name == '/' and self.delivery_order :
File "/odoo/odoo-server/odoo/fields.py", line 1050, in __get__
record.ensure_one()
File "/odoo/odoo-server/odoo/models.py", line 5181, in ensure_one
raise ValueError("Expected singleton: %s" % self)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Expected singleton: pos.order(513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 495, 494, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474)

Avatar
Discard

"How to fix this error" is not a question. I have edited your post to make the title a question. In the future, please consider using a Question that can make it clear what you ask without requiring people to open your post, as this will often increase the chances people will respond and make everything clearer for others looking for the same answer. If everyone on the forum posted "How to fix this error" it would require EVERYONE to open EVERY POST before they knew ANYTHING. Does this make sense?

You may also want to tell readers what VERSION (13, 14, 15) of Odoo this is happening on and which EDITION (Community, Enterprise).

Related Posts Replies Views Activity
0
Dec 24
46
1
Dec 24
176
0
Nov 24
90
1
Nov 24
153
1
Nov 24
187