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

How to avoid 500: Internal Server Error for non existing record

Subscriure's

Get notified when there's activity on this post

This question has been flagged
shoperrorproduct500v11
3 Respostes
7838 Vistes
Avatar
Paulius Grigas

Hey there,

say I have product in eCommerce and it's url is:

/shop/product/cake-123

If I delete or unpublish that product and someone calls it's url odoo generates 500 error.

How can I inform visitors what product was deleted or at least to generate 401 error?

Also log file is full of error messages and it is hard to see other errors.

Thank you.

 


0
Avatar
Descartar
Hilar Andikkadavath

can you please update your question with the log, so we can find what happened

Avatar
Paulius Grigas
Autor Best Answer

Hello, Guys,

thank you for your response. Here is a log:

2017-12-08 09:26:01,678 11322 ERROR db_v11 odoo.addons.website.models.ir_http: 500 Internal Server Error:
Traceback (most recent call last):
  File "/opt/odoo/odoo/fields.py", line 944, in __get__
    value = record.env.cache.get(record, self)
  File "/opt/odoo/odoo/api.py", line 960, in get
    value = self._data[field][record.id][key]
KeyError: <odoo.api.Environment object at 0x7f1717f899e8>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/opt/odoo/addons/http_routing/models/ir_http.py", line 425, in _postprocess_args
    _, path = rule.build(arguments)
  File "/opt/venv/lib/python3.6/site-packages/werkzeug/routing.py", line 798, in build
    add(self._converters[data].to_url(values[data]))
  File "/opt/odoo/addons/http_routing/models/ir_http.py", line 187, in to_url
    return slug(value)
  File "/opt/odoo/addons/http_routing/models/ir_http.py", line 88, in slug
    identifier, name = value.id, value.display_name
  File "/opt/odoo/odoo/fields.py", line 951, in __get__
    value = record.env.cache.get(record, self)
  File "/opt/odoo/odoo/api.py", line 961, in get
    return value.get() if isinstance(value, SpecialValue) else value
  File "/opt/odoo/odoo/api.py", line 993, in getter
    raise exception
  File "/opt/odoo/odoo/fields.py", line 1020, in compute_value
    self._compute_value(record)
  File "/opt/odoo/odoo/fields.py", line 1006, in _compute_value
    getattr(records, self.compute)()
  File "/opt/odoo/odoo/models.py", line 1420, in _compute_display_name
    names = dict(self.name_get())
  File "/opt/odoo/addons/product/models/product_template.py", line 330, in name_get
    for template in self]
  File "/opt/odoo/addons/product/models/product_template.py", line 330, in <listcomp>
    for template in self]
  File "/opt/odoo/odoo/fields.py", line 944, in __get__
    value = record.env.cache.get(record, self)
  File "/opt/odoo/odoo/api.py", line 961, in get
    return value.get() if isinstance(value, SpecialValue) else value
  File "/opt/odoo/odoo/api.py", line 993, in getter
    raise exception
  File "/opt/odoo/odoo/fields.py", line 1015, in compute_value
    self._compute_value(records)
  File "/opt/odoo/odoo/fields.py", line 1006, in _compute_value
    getattr(records, self.compute)()
  File "/opt/odoo/odoo/models.py", line 1420, in _compute_display_name
    names = dict(self.name_get())
  File "/opt/odoo/addons/product/models/product_template.py", line 330, in name_get
    for template in self]
  File "/opt/odoo/addons/product/models/product_template.py", line 330, in <listcomp>
    for template in self]
  File "/opt/odoo/odoo/fields.py", line 951, in __get__
    value = record.env.cache.get(record, self)
  File "/opt/odoo/odoo/api.py", line 961, in get
    return value.get() if isinstance(value, SpecialValue) else value
  File "/opt/odoo/odoo/api.py", line 993, in getter
    raise exception
  File "/opt/odoo/odoo/models.py", line 2523, in read
    values[name] = field.convert_to_read(record[name], record, use_name_get)
  File "/opt/odoo/odoo/models.py", line 4660, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/opt/odoo/odoo/fields.py", line 944, in __get__
    value = record.env.cache.get(record, self)
  File "/opt/odoo/odoo/api.py", line 961, in get
    return value.get() if isinstance(value, SpecialValue) else value
  File "/opt/odoo/odoo/api.py", line 993, in getter
    raise exception odoo.exceptions.MissingError: ('Record does not exist or has been deleted.', None)
0
Avatar
Descartar
Avatar
Ermin Trevisan
Best Answer

You get a 500 error code because of serious errors in your application deployment, not because of a product URL not found. If you want to deploy a software in order to use it, it is sometimes helpful to read the error messages and to solve the corresponding issues. If you are looking for help, please provide the necessary information, especially the log entries.

0
Avatar
Descartar
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
Website shop comparison for similar products
shop product ecommerce v11 comparison
Avatar
0
d’abr. 18
5306
Server Error V11
server error 500 v11 v11.0
Avatar
0
de nov. 17
4847
Select products with 3 shops on the same database (V18)
shop product
Avatar
0
d’oct. 25
514
Error 500 on Ubuntu - Odoo Server 15.0
error 500
Avatar
0
de des. 21
2420
code error 500 - Internal Server Error
error 500
Avatar
Avatar
2
d’oct. 20
8466
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