Hi guys,
getting this error Odoo 18 when trying to create a manufacturing order (the same process works for products of other companies on the same server.
Odoo Server Error
RPC_ERROR
Occured on mycompany.com on model mrp.production and id 309 on 2025-03-06 06:27:01 GMT
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1962, in _transactioning
return service_model.retrying(func, env=self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 156, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1929, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 2177, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 36, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 533, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/models/models.py", line 72, in web_save
self = self.create(vals)
File "<decorator-gen-331>", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 495, in _model_create_multi
return create(self, [arg])
File "/usr/lib/python3/dist-packages/odoo/addons/mrp/models/mrp_production.py", line 949, in create
vals['name'] = self.env['stock.picking.type'].browse(picking_type_id).sequence_id.next_by_id()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_sequence.py", line 270, in next_by_id
return self._next(sequence_date=sequence_date)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_sequence.py", line 259, in _next
return self._next_do()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_sequence.py", line 200, in _next_do
number_next = _update_nogap(self, self.number_increment)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_sequence.py", line 57, in _update_nogap
self._cr.execute("SELECT number_next FROM %s WHERE id=%%s FOR UPDATE NOWAIT" % self._table, [self.id])
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 354, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UndefinedFunction: operator does not exist: integer = boolean
LINE 1: SELECT number_next FROM ir_sequence WHERE id=false FOR UPDAT...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPCError@https://mycompany.com/web/assets/debug/web.assets_web.js:29740:9 (/web/static/src/core/network/rpc.js:11)
makeErrorFromResponse@https://mycompany.com/web/assets/debug/web.assets_web.js:29763:19 (/web/static/src/core/network/rpc.js:34)
rpc._rpc/promise</<@https://mycompany.com/web/assets/debug/web.assets_web.js:29817:48 (/web/static/src/core/network/rpc.js:88)
The key to solution is this:
psycopg2.errors.UndefinedFunction: operator does not exist: integer = boolean
LINE 1: SELECT number_next FROM ir_sequence WHERE id=false FOR UPDAT...
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
The function seems to search for the next operator from a number sequence, but cannot find.