Odoo 14 enterprise POS close session error (ProgrammingError: can't adapt type 'res.partner')

170 Views Asked by At

when i try to close my session and post entries for my POS,
I had this error :

Odoo Server Error Traceback (most recent call last): File "/opt/odoo14/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/opt/odoo14/odoo/http.py", line 683, in dispatch result = self._call_function(**self.params) File "/opt/odoo14/odoo/http.py", line 359, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo14/odoo/service/model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo14/odoo/http.py", line 347, in checked_call result = self.endpoint(*a, **kw) File "/opt/odoo14/odoo/http.py", line 912, in call return self.method(*args, **kw) File "/opt/odoo14/odoo/http.py", line 531, in response_wrap response = f(*args, **kw) File "/opt/odoo14/addons/web/controllers/main.py", line 1393, in call_button action = self._call_kw(model, method, args, kwargs) File "/opt/odoo14/addons/web/controllers/main.py", line 1381, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo14/odoo/api.py", line 396, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "/opt/odoo14/odoo/api.py", line 383, in _call_kw_multi result = method(recs, *args, **kwargs) File "/opt/odoo14/custom_addons/bi_pos_pay_later/models/pos_session.py", line 35, in action_pos_session_closing_control session.action_pos_session_close() File "/opt/odoo14/addons/point_of_sale/models/pos_session.py", line 295, in action_pos_session_close return self._validate_session() File "/opt/odoo14/addons/point_of_sale/models/pos_session.py", line 311, in _validate_session self.with_company(self.company_id)._create_account_move() File "/opt/odoo14/addons/point_of_sale/models/pos_session.py", line 408, in _create_account_move data = self._create_invoice_receivable_lines(data) File "/opt/odoo14/addons/point_of_sale/models/pos_session.py", line 657, in _create_invoice_receivable_lines receivable_line = MoveLine.create(vals) File "", line 2, in create File "/opt/odoo14/odoo/api.py", line 345, in _model_create_multi return create(self, arg) File "/opt/odoo14/addons/account/models/account_move.py", line 3843, in create lines = super(AccountMoveLine, self).create(vals_list) File "", line 2, in create File "/opt/odoo14/odoo/api.py", line 345, in _model_create_multi return create(self, arg) File "/opt/odoo14/odoo/addons/base/models/ir_fields.py", line 533, in create recs = super().create(vals_list) File "", line 2, in create File "/opt/odoo14/odoo/api.py", line 345, in _model_create_multi return create(self, arg) File "/opt/odoo14/odoo/models.py", line 3868, in create records = self._create(data_list) File "/opt/odoo14/odoo/models.py", line 3974, in _create cr.execute(query, params) File "", line 2, in execute File "/opt/odoo14/odoo/sql_db.py", line 101, in check return f(self, *args, **kwargs) File "/opt/odoo14/odoo/sql_db.py", line 298, in execute res = self._obj.execute(query, params) Exception

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

Traceback (most recent call last):
  File "/opt/odoo14/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo14/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
psycopg2.ProgrammingError: can't adapt type 'res.partner'

this happened especially if some of my POS orders are invoiced ( defined with customers ) How can i solve it ? i use odoo 14 enterprise hosted on premise.

1

There are 1 best solutions below

0
Mihran Thalhath On

The shared error log says you use third-party modules like 'bi_pos_pay_later'. Kindly make sure that these modules are not the ones causing errors by creating a new database with these modules and checking the same workflow. If you find that the issue is with the third-party modules, kindly report the same to its developers since they will be better suited to help you.