Skip to Content
Menu
This question has been flagged
3 Replies
1456 Zobrazenia

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)

Avatar
Zrušiť

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.

Best Answer

Hi,

The RPC_ERROR is caused because the MO does not have a valid picking_type_id, which leads to trying to fetch a sequence from False.

Fixing it involves:


Ensuring the product’s company is correct.


Ensuring a Manufacturing picking type exists for that company.


Ensuring the picking type has a valid sequence.


Hope it helps.

Avatar
Zrušiť
Best Answer

We had a similar problem. The root cause for us was that the ir_sequence​ record referenced by stock_picking_type.sequence_id​ was missing.

Avatar
Zrušiť
Best Answer

It appears there's a data type mismatch in your sequence configuration causing the manufacturing order creation to fail.



  First, check the sequence used for your manufacturing orders. Go to Inventory > Configuration > Sequences & Identifiers > Sequences and find the sequence related to your manufacturing orders (likely linked to the Manufacturing app).

  Next, verify the "Implementation" field of the sequence. Ensure it is set to "Standard" and not something that could be interfering with the integer-based sequence numbering.

  Then, examine the "Number Next" field. It should contain an integer value. If it contains 'False' or any other non-integer value, manually correct it to a valid integer.

  Finally, review any customizations or modules related to manufacturing or sequences. A custom module might be incorrectly altering the sequence's behavior or data type.


For personalized assistance:
https://www.pragtech.co.in/contact-us-mql.html

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
sep 25
892
2
sep 25
500
2
sep 25
467
4
sep 25
599
3
sep 25
677