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

leaves unit of measure

Suscribirse

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

Se marcó esta pregunta
hrv7leaves
1 Responder
7160 Vistas
Avatar
Davide Corio

it seems that leaves can be requested in days only. if, using date from/to fields on the leave request form, i select 4 hours, openerp counts always 1 day.

is it possible to change this behaviour? are you aware of 3rd party addons that modify this and allow to specify hours instead of days?

2
Avatar
Descartar
Avatar
Cyril Gaspard (GEM)
Mejor respuesta

Hi,

perhaps :

menu settings/configuration/sales check box to True for "Allow using different units of measures" and apply

now, in menu sales/configuration you will have a new section "units of measure".

click on this section and you will have days and hours as "working time category".

days is the unit of reference, and hours lower than the unit of reference (warning, just configure one unit of reference by category, there was a bug with this in 6.0, but now ???)

then to compare unit of reference and other (smaller or biggert than unit of reference), use ratio value.

Update :

I'm looking hr holidays code, the problem comes from 2 functions onchange_date_from and onchange_date_to.

In the first if you add value only in date_from, value returned is 8 hours, with working time unit of measure this will correspond to one day (see the ratio days/hours).

if there is date_from and date_to, this will return :

diff_day = self._get_number_of_days(date_from, date_to)
        result['value']['number_of_days_temp'] = round(math.floor(diff_day))+1

here round will convert float to integer with 0 as result for 4 hours, that's why it is add + 1 after round function. This is strange because number_of days has type float ...

I think this is an error ....

Update 2 :

solution here could be, but to test result (not done), by adding 2 decimals to the result :

result['value']['number_of_days_temp'] = round(math.floor(diff_day), 2)

perhaps verify the rest of the code too and just add filter cases for 1/4 day, 1/2 day, 3/4 day.

Hoping that solves your problem.

Bye

1
Avatar
Descartar
Davide Corio
Autor

unfortunately that setting isn't used by the hr application.

Cyril Gaspard (GEM)

Hi, I update my answer. This will explain why you already have 1 day for 4 enter's hours. Bye

Davide Corio
Autor

i actually think the reason is that in belgium it isn't possible to ask leaves in hours, then they round them to 1 day

Cyril Gaspard (GEM)

I proposed a solution for the 2 functions, but I not verify the rest of the code. Bye

Cyril Gaspard (GEM)

"i actually think the reason is that in belgium it isn't possible to ask leaves in hours, then they round them to 1 day",, I believe this is an international erp. Bye.

Cyril Gaspard (GEM)

perhaps to report as a bug ?

¿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 can I import photos of my employees into HR module? Resuelto
hr v7
Avatar
Avatar
Avatar
Avatar
3
oct 23
14317
How do I send out emails to all followers when an update happens in the HR (hiring) module)
hr v7
Avatar
Avatar
1
mar 15
8285
There is no reference available for base.element
hr v7
Avatar
0
mar 15
5118
How to allow manager to access his employees or his department only? Resuelto
security hr v7
Avatar
Avatar
Avatar
Avatar
14
sept 24
25964
How to carry forward leaves from year to next year or month to next month?
hr leaves customization
Avatar
Avatar
1
ene 18
6825
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