Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Odoo10 - OperationalError: could not obtain lock on row in relation "ir_sequence", How to resolve this?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
sequenceodooOperationalErrorodoo10
2 Respostes
13014 Vistes
Avatar
Sebin Siby

I have created a sequence and it was working perfectly but now I'm getting the following error. While creating a new record I'm calling that sequence form the create method.

How can I resolve this?

I'm not able to do any actions with that sequence record from front end and from the database side also.



0
Avatar
Descartar
Avatar
Midhun M M
Best Answer

Now we are in version 16 Enterprise,

 still i am facing the same problem


RPC_ERROR

Odoo Server Error

Traceback (most recent call last):

  File "/home/odoo/src/odoo/odoo/http.py", line 1633, in _serve_db

    return service_model.retrying(self._serve_ir_http, self.env)

  File "/home/odoo/src/odoo/odoo/service/model.py", line 133, in retrying

    result = func()

  File "/home/odoo/src/odoo/odoo/http.py", line 1660, in _serve_ir_http

    response = self.dispatcher.dispatch(rule.endpoint, args)

  File "/home/odoo/src/odoo/odoo/http.py", line 1864, in dispatch

    result = self.request.registry['ir.http']._dispatch(endpoint)

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch

    result = endpoint(**request.params)

  File "/home/odoo/src/odoo/odoo/http.py", line 697, in route_wrapper

    result = endpoint(self, *args, **params_ok)

  File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 46, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/home/odoo/src/odoo/odoo/api.py", line 468, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/home/odoo/src/odoo/odoo/api.py", line 453, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/home/odoo/src/user/sale_base_16/models/sale_approval.py", line 509, in get_approval

    self.action_confirm()

  File "/home/odoo/src/user/sale_base_16/models/sale_approval.py", line 430, in action_confirm

    return super(CustomSaleOrder, self).action_confirm()

  File "/home/odoo/src/user/sale_base_16/models/models.py", line 58, in action_confirm

    rec.name = rec.doc_type_id.sequence_id.next_by_id()

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_sequence.py", line 274, in next_by_id

    return self._next(sequence_date=sequence_date)

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_sequence.py", line 263, in _next

    return self._next_do()

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_sequence.py", line 204, in _next_do

    number_next = _update_nogap(self, self.number_increment)

  File "/home/odoo/src/odoo/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 "/home/odoo/src/odoo/odoo/sql_db.py", line 321, in execute

    res = self._obj.execute(query, params)

psycopg2.errors.LockNotAvailable: could not obtain lock on row in relation "ir_sequence"

 

 

The above server error caused the following client error:

RPC_ERROR: Odoo Server Error

    at makeErrorFromResponse (https://ltindia-ltindia.odoo.com/web/assets/19741-472c7f6/web.assets_backend.min.js:1000:163)

    at XMLHttpRequest. (https://ltindia-ltindia.odoo.com/web/assets/19741-472c7f6/web.assets_backend.min.js:1008:13)


0
Avatar
Descartar
Avatar
La Jayuhni Yarsyah
Best Answer

Thats error message caused by postgresql failed to fetch some record because the record wich related to the action but the pgsql still processing (can be write command or etc) by another request at postgresql buffer.


If you use "No Gap" implementation then for a simple way to resolve your issue you can try change the implementation to "Standard"




But if you still require to use "No Gap" implementation maybe you must reconfigure your postgresql server configuration,, or you can optimize your server to speed up the performance

Further read:
https://www.postgresql.org/docs/9.1/explicit-locking.html


0
Avatar
Descartar
Sebin Siby
Autor

I have tried this already but the problem is I'm not able to save the record after that change. Both from the front end and from database also i tried. It's not saving. It's getting timeout.

La Jayuhni Yarsyah

Timeout means it execute heavy transaction, so you must debug it,,, and analyse why it so took long time...

Maybe you can see log (using --log-level=debug)

What postgresql version what you have ?Can you tell your server specification (CPU,RAM, OS, POstgresql)?

Is this happened on your production stage or you try in development stage??

If in production stage, are the database sizes big ??

You said that you also tried inserting data direct into database,, I think,, its trouble comes from your installed postgresql server..

Regards..

Sebin Siby
Autor

Thanks for your support.

It's resolved after restarting the postgresql service.

It was in live server and the database is very big. I don't know why that error came. Anyway its resolved now after restarting postgresql.

La Jayuhni Yarsyah

Ok if my answers was helpful please vote up / accept my answers,, and i would like to say thanks.

Regards

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Can we use odoo as a ticket system and time management system in a certain facility
odoo odoo10
Avatar
0
d’ag. 22
3257
I had error in related field , did i miss something ? Solved
odoo odoo10
Avatar
Avatar
1
de jul. 22
21083
How to solve dataCorrupted: could not read block in file ?
odoo odoo10
Avatar
0
d’abr. 22
3809
How to Ignore the Arguments in Products URL in Odoo 10?
odoo odoo10
Avatar
Avatar
Avatar
3
de set. 21
3945
how to connect local zktecho biometric (F19) device with odoo 10 installed in cloud server
odoo odoo10
Avatar
Avatar
Avatar
2
de set. 21
5375
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now