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

I want create menu that show list of employee birthday in current month.

Suscribirse

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

Se marcó esta pregunta
hremployee
11 Respuestas
10740 Vistas
Avatar
Jagdish Panchal

Hi,

I want create menu that show list of employee birthday in current month. I have pass domain in action but getting issue .

Domain:

  <field name="domain" eval="['&amp;', ('birthday','&gt;=', time.strftime('%%m-%%d')),('birthday','&lt;=', time.strftime('%%m-%%d'))]"/>
  <field name="domain" eval="['&amp;', ('birthday','&gt;=', time.strftime('%Y-%m-%d')),('birthday','&lt;=', time.strftime('%Y-%m-%d')))]"/>

help please

0
Avatar
Descartar
Prakash

can u post your domain condition code?..

Jagdish Panchal
Autor

@prakash: I have update my que. I have try both this domain but facing issue

Avatar
Prakash
Mejor respuesta

Please see the link  http://stackoverflow.com/questions/14537302/want-to-show-data-group-by-year-month-week-in-openerp-7

Try the below code:-

filter icon="terp-go-month" string="Month" name="month" domain="[('birthday','&lt;=',(context_today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('birthday','&gt;=',(context_today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]" help="Current Month" context="{'group_by':'birthday'}"/>

1
Avatar
Descartar
Jagdish Panchal
Autor

Prakash i have try this code but getting " name 'context_today' is not defined" error I want pass this domain in action.

Jagdish Panchal
Autor
This domain is work but it check like birthday between 01-07-2014 to 31-07-2014 there is no employee birthday between this date
Prakash

oh.. yes i think need to change domain condition..

Jagdish Panchal
Autor

have update answer with new domain ?

Avatar
Nehal
Mejor respuesta

Hi,

Refer the following link it may help you:
http://stackoverflow.com/questions/16535704/openerp-7-many2one-with-current-month-filter
 

1
Avatar
Descartar
Avatar
Jagdish Panchal
Autor Mejor respuesta

Hi,

Prakash and nehal thanx for the answer i have found solution. Create one function field that get month and date from employee birthday. I have use this field with domain [('month','&lt;=',(context_today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('month','&gt;=',(context_today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))] its work fine.

0
Avatar
Descartar
Avatar
Gaurav Sahu
Mejor respuesta

Hi

I have created a sql view for employee Birthday and show in calendar. 


Sql View:
select h.id,concat(concat(date_part('Year',current_date),'-'),to_char(h.birthday, 'mm-dd')),r.name from hr_employee as h join resource_resource as r on h.resource_id=r.id where r.active='t';


employee_birthday.py


from openerp import tools

from openerp.osv import fields,osv

class birthday_report(osv.osv):

_name = "birthday.report"

_auto = False

_columns = {

'name': fields.many2one('hr.employee','Employee'),

'dob' : fields.date('Birthday'),

}

def init(self, cr):

tools.drop_view_if_exists(cr, 'birthday_report')

cr.execute("""

create or replace view birthday_report as (

select

h.id as id,

h.id as name,

concat(concat(date_part('Year',current_date),'-'),to_char(h.birthday, 'mm-dd')) as dob

from

hr_employee as h

join

resource_resource as r

on

h.resource_id=r.id

where 
r.active ='t'

)

""")

birthday_report()



employee_birthday_view.xml



<record id="view_birthday_report_calendar" model="ir.ui.view">

<field name="name">Employee Birthday</field>

<field name="model">birthday.report</field>

<field name="arch" type="xml">

<calendar string="Birthday" color="name"

date_start="dob"

quick_add="False" avatar_model="hr.employee">

<field name="name"/>

</calendar>

</field>

</record>


 

0
Avatar
Descartar
Avatar
Bruno JOLIVEAU
Mejor respuesta

Hi,

Maybe, you'll need to display other dates on event, you can user super_calendar module to unify in one calendar view

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 create an auto increment ID Number field in HR Employee? Resuelto
hr employee
Avatar
Avatar
Avatar
Avatar
Avatar
7
nov 20
26023
Employee Resume - Department Changes (V17)
hr employee department
Avatar
Avatar
1
jun 24
2325
[Odoo 16] How to end collaboration with / separate / offboard an employee Resuelto
hr employee quickstart
Avatar
1
dic 22
5022
How can I create Employee Code in a sequence field Resuelto
v6.1 hr employee
Avatar
Avatar
Avatar
Avatar
14
ago 20
32873
How to manage employee training ?
hr employee training
Avatar
Avatar
Avatar
3
feb 19
10832
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