Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita 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
  • Proyectos
  • 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
10722 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.

Registrarse
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
26013
Employee Resume - Department Changes (V17)
hr employee department
Avatar
Avatar
1
jun 24
2305
[Odoo 16] How to end collaboration with / separate / offboard an employee Resuelto
hr employee quickstart
Avatar
1
dic 22
5018
How can I create Employee Code in a sequence field Resuelto
v6.1 hr employee
Avatar
Avatar
Avatar
Avatar
14
ago 20
32856
How to manage employee training ?
hr employee training
Avatar
Avatar
Avatar
3
feb 19
10826
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • 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 estar 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