Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Food & Hospitality
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Guest House
    • Distribuidor de bebidas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consulting
    • Accounting Firm
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Trades
    • Handyman
    • Hardware y asistencia informática
    • Solar Energy Systems
    • Zapatero
    • Servicios de limpieza
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

How to search without accented characters?

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
postgresqlsearch
2 Respuestas
39652 Vistas
Avatar
Ahmet Altinisik

I would like to know how can we enable to search without accented characters in OpenERP.

For instance: searching for café would return results containing café (with accent) and cafe (without accent).

10
Avatar
Descartar
Avatar
Guewen Baconnier
Mejor respuesta

You have some details about that in server/openerp/osv/expression.py.

Basically you'll need to:

  1. Install the PostgreSQL contrib unaccent.sql
  2. Launch your OpenERP server with the option --unaccent

Install unaccent on Postgresql 9.1+

The unaccent contrib comes with Postgresql contribs. On Debian / Ubuntu, in order to have the contribs, you need to install postgresql-contrib:

sudo apt-get install postgresql-contrib-9.1

You should use the new CREATE EXTENSION command to install unaccent:

psql <database> -c "CREATE EXTENSION \"unaccent\"";

Install unaccent on Posgresql 9.0

The unaccent contrib comes with Postgresql contribs. On Debian / Ubuntu, in order to have the contribs, you need to install postgresql-contrib:

sudo apt-get install postgresql-contrib-9.0

The unaccent contrib has to be enabled on the database (below, <database> is the database where you want to enable the searches with accents, check the postgresql version in the path):

psql <database> -f /usr/share/postgresql/9.0/contrib/unaccent.sql

Check if it works

You can check if unaccent is working doing:

psql <database> -c "select unaccent('hélène')"

It should display helene.

Start the server

Start the server with the option --unaccent

/path/to/openerp-server.py --unaccent

Or add the option

unaccent = True

in the OpenERP configuration file.

18
Avatar
Descartar
Ahmet Altinisik
Autor

thank you for the nice and clear answer. I just got stuck in the enabling unaccent.sql to the database. I am running ubuntu 12.04 with postgresql 9.1 installed postgresql-contrib but cannot find the unaccent.sql in my system.

Guewen Baconnier

I edited my answer with the installation instructions for postgresql 9.1

Ahmet Altinisik
Autor

superb let me try and get back

Ahmet Altinisik
Autor

Works nicely, Thanks again. Note that psql <database> -c "CREATE EXTENSION \"unaccent\""; command should run as a postgress admin user like: sudo -u postgres psql <database> -c "CREATE EXTENSION \"unaccent\"";

Jairo Llopis

Instead of adding --unaccent to the server startup command, you can add unaccent = True to /etc/openerp/openerp-server.conf and just do a sudo service openerp restart.

Gilles Lehoux

I used: sudo -u postgres psql <database> -c "CREATE EXTENSION \"unaccent\""; but got ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/unaccent.control": No such file or directory ERROR:: command not found What is my error? Missing step?

Guewen Baconnier

@Gilles http://stackoverflow.com/questions/12100638/error-when-creating-unaccent-extension-on-postgresql

Chandni Gandhi

Thank you so much, that worked like Charm.

Avatar
Ahmet Altinisik
Autor Mejor respuesta

thank you for the nice and clear answer. I just got stuck in the enabling unaccent.sql to the database. I am running ubuntu 12.04 with postgresql 9.1 installed postgresql-contrib but cannot find the unaccent.sql in my system.

sudo apt-get install postgresql-contrib

but there is no unaccent.sql when I do a locate search two similar files show up

locate unaccent

/usr/share/postgresql/9.1/extension/unaccent--1.0.sql
/usr/share/postgresql/9.1/extension/unaccent--unpackaged--1.0.sql

there are two different unaccent sql files which file should I use

/usr/share/postgresql/9.1/extension/unaccent--1.0.sql

or

/usr/share/postgresql/9.1/extension/unaccent--unpackaged--1.0.sql

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
How to compare dates before validation Resuelto
postgresql search odoo
Avatar
Avatar
1
feb 16
6566
How do I filter a spreadsheet pivot to the current/previous month
search
Avatar
Avatar
1
jul 25
1360
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Avatar
0
feb 25
2789
Search a message Resuelto
search
Avatar
Avatar
1
feb 25
1778
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
postgresql
Avatar
Avatar
Avatar
2
ene 25
9884
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

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