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
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • 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

Why does Product search-view not show all products?

Suscribirse

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

Se marcó esta pregunta
filterproductsearchview
7 Respuestas
14509 Vistas
Avatar
Jae Landers

When entering a line on a Sale Order, I click the Search more button and a Product Search view comes up. This search view shows 80 of 160 products. I have about 1200 products loaded into the system. Whatever the logic is that is pulling these 160 items is also effecting default filters applied to that view.

As an example, I set a filter to show all products that have a cost price of 10$ or more which should pull up 502 items, but it only pulls 120 records. If I then un-apply the filter and re-apply it, thien it shows all 502. So, the logic seems to apply when the window is opened, and not at all afterwards. I don't really know where to look for something that would apply in the background, and then disappear...

1
Avatar
Descartar
Avatar
Axel Mendoza
Mejor respuesta

I solved this using the following js extension:

instance.web.DataSet.include({

name_search: function (name, domain, operator, limit) {

limit = 0;

return this._model.call('name_search', {

name: name || '',

args: domain || false,

operator: operator || 'ilike',

context: this._model.context(),

limit: limit || 0

});

},

});

0
Avatar
Descartar
Avatar
Jae Landers
Autor Mejor respuesta

After quite a bit of searching and digging around, I found where this is coded in -

addons/web/static/src/js/view_form.js

values.push({

label: _t("Search More..."),

action: function() {

+ dataset.name_search(search_val, self.build_domain(), 'ilike', 160).done(function(data) {

self._search_create_popup("search", data);

});

---------------------

The point which states '160' is the limit of how many items will be pulled up by the Search More window upon initial query. I modified this to be 161 on a dev system just to test and it worked - the list that was pulled up gave me 161 records.

 

Now I need to figure out how to override this as I would rather not mess with the original code.

1
Avatar
Descartar
john5000

Kyle, Great that you found that. Very good to know. Here is a link on how to override/extend js code: https://www.odoo.com/forum/help-1/question/how-can-i-extend-a-js-web-module-64

Avatar
john5000
Mejor respuesta

Since this is somewhat hard to track down, one way to check this type of problem is to see what the underlying SQL query is doing. That is simple to view and will shed light on what filters are being applied.

You just need to turn on the postgres logging to show all SQL statements that are run, then do your actions, and then check the postgres log file to see what SQL was run. 

Here is how to enable the logging of SQL statements:

  1. Find your "postgresql.conf" file.  (You can find it by doing the following Query in SQL: "show config_file")
  2. Edit that file and set:
    • log_statement=all   -- usual default is set to "none".
    • OR, other way is to set: log_min_duration_statement = 0
  3. You will need to find out where your log file is. Look for "log_destination" in that same postresql.conf file to help find it. I use the GreenOdoo distro and it logs to /var/odoo8/runtime/psql/logfile
  4. Restart postgresql.

After setting that, do the first product search (also, make sure you are the only user). Then look in the log to see what SQL was executed. There will be a lot of excess SQL which you can skip.  Search for "product_product" or "product_template" which are the tables used for products. From there you can see what filters were appled when quering from the table.

 

0
Avatar
Descartar
Avatar
Vasanth
Mejor respuesta

Hi,

In Openerp,they set the limit has 80 or 120.you can set the limit in the super method as

res = super(product_product,self).name_search(cr, uid, name, args=args, operator=operator, context=context, limit=limit)

0
Avatar
Descartar
Avatar
Sathors
Mejor respuesta

You can also refer to this Github issue: https://github.com/odoo/odoo/issues/2235

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
Search for warehouse inside products tree view
filter product search
Avatar
Avatar
1
nov 22
2551
Suggestions for global filtering data by company?
filter searchview odoo10
Avatar
Avatar
1
oct 22
4847
Filter sale.line on product categories give all product in sub-categories.
filter product categories
Avatar
1
mar 15
5335
[✅ SOLVED] How to extend a XML search filter view and add an additional filter ? Resuelto
filter searchview xmlview v18
Avatar
Avatar
1
may 25
3325
Search Bar Filter Customization
filter xml searchview searchbar
Avatar
0
nov 24
1280
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