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

Search within a period of date

Suscribirse

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

Se marcó esta pregunta
filterdatev7search
22 Respuestas
50297 Vistas
Avatar
Mohamed arif

How I can add option to search any record by period for a date/datetime field? User should able to select to date ranges to find records.

In previous versions we have to add date field in search view only, so that the user can select date and datetime ranges and easily find records.

Using Save Custom Filter, we can save filter for static or related date ranges only. I want to enter date ranges as user needs.

Have any suggestions please

8
Avatar
Descartar
Francesco OpenCode

What version of OpenERP are you using?

Mohamed arif
Autor

Version 7.

Avatar
Prakash
Mejor respuesta

Search Date Range solved in openerp 7 using the below link:-

http://forum.openerp.com/forum/topic31468.html

In python, in "columns", add two dummy functional fields like this:

'due_date_from':fields.function(lambda *a,**k:{}, method=True, type='date',string="Due date from"),
'due_date_to':fields.function(lambda *a,**k:{}, method=True, type='date',string="Due date to"),

And in the search view:
<field name="due_date_from" filter_domain="[('date_due','&gt;=',self)]"/>
<field name="due_date_to" filter_domain="[('date_due','&lt;=',self)]"/>

The above code working in the [Normal Form] search view and also reports using SQL query

7
Avatar
Descartar
Ademola Oke

Nice workaround! Works very well. Also possible using the AND mode in advanced search. See http://help.openerp.com/question/1130/how-to-use-and-or-operators-in-advanced-filters/

evon_dun

I did same in my OpenErp v6.1 but can't understand how to use value of these in the reports... please help if anyone knows about it.

Prakash

The above same code also working in the report search date range.

evon_dun

Sorry I didn't get you. I tried adding these in the report but it returns [], since lamda can never return.

Prakash

In search box when typing date have you get auto suggestion From Date and To Date in the search box after adding the code?....

evon_dun

No, i don't. My searching is perfect but i just want to add this range on top of my invoice report like it does in other partner reports. From 'Date' to 'Date'. Got it??

Prakash

The above code working in the reports search view using Sql query. Are u using same?..

evon_dun

No, i just added these two fields in my report like we add other fields in openoffice, please guide how to use sql query for the same..

evon_dun

No, i just added these two fields in my report like we add other fields in openoffice, please guide how to use sql query for the same..

Prakash

using openoffice i not used date range or sql query. Date range and sql used in report For example Report --> Sales --> Sales Analysis. Actually data range working based on given input from the user.

evon_dun

Then what do you suggest me to get the range in my reports too any idea?

Prakash

I think in openoffice report there is no options wizard or select input to the user. so i suggest in openoffice report search view add date range and filter data and select print options to view report

Avatar
Francesco OpenCode
Mejor respuesta

If you wanna search a date reange you must use the advanced filter.

  1. Open the filters popup and expand Andvanced Filters voice.
  2. Select your date (or datetime) field and select the greater or equal then parameter and insert the smallest data (smallest limit).
  3. Then apply the filter

image description

Use the some passes to insert another filter with the biggest limit but this time select less or equal then parameter. Apply this filter, too.

image description

Now you have your range limit with date values

image description

1
Avatar
Descartar
Mohamed arif
Autor

Thanks Francesco Apruzzese,

But this always will search with saved date only. If user wants search with another period, he have to select field, condition and date again twice. It is not user friendly.

Francesco OpenCode

This is the only way. If you insert the date field in filters, you can only search the precis date (only one day) for time. I know this is not user friendly but this is the way.

Mohamed arif
Autor

In the List view of Journal Items ( Accounting / Journal Entries / Journal Items ) , here we can see Filter option by 'Period' and 'Journal' in old version style. I checked and it is working fien. Can someone explain how these fields are added.?

Avatar
Nikunj Antala
Mejor respuesta

There is app available in app store Its a Paid app.



https://apps.odoo.com/apps/modules/10.0/odoo_advance_search/

0
Avatar
Descartar
Avatar
Mohamed arif
Autor Mejor respuesta

In the List view of Journal Items ( Accounting / Journal Entries / Journal Items ) , here we can see Filter option by 'Period' and 'Journal' in old version style. I checked and it is working fine.

image description

Can someone explain how these fields are added.?

0
Avatar
Descartar
Timothy Solomon

Periods are actually normal openERP objects, not dates. So the name of the period is "05/2013" in that case, so its not actually searching by date, its just searching by many2one type link. Prakash's solution is the best workaround in my opinion.

¿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 use method search to get the ids from a date interval? Resuelto
date v7 search
Avatar
Avatar
Avatar
2
mar 15
4908
Customer: Advanced search filter not working?
filter v7 search
Avatar
Avatar
1
mar 15
10376
how get date from datetime field in domain of search view? Resuelto
filter date search datetime
Avatar
Avatar
Avatar
2
ene 23
14627
How to filter by dates (date between two dates)
filter date search domain_filter
Avatar
Avatar
1
dic 20
21965
When do search filters get "AND"ed and when do they get "OR"ed?
development filter v7 search
Avatar
0
mar 15
4646
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