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
    • e-learning
    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
    • Conocimientos
    • 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 pub
    • 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
    • Cervecería
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y soporte técnico
    • 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
    Explorar todos los sectores
  • 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
    • Servicios para 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

Wrong date format on PDF of invoice

Suscribirse

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

Se marcó esta pregunta
pdfdateformat
9 Respuestas
12714 Vistas
Avatar
Fotis Dimanidis

While my date format settings for the corresponding (and every) language are "%d/%m/%Y" in PDF export (aka print) it is always "%m/%d/%Y". How can I fix this?

0
Avatar
Descartar
Fotis Dimanidis
Autor

Thank you Yenthe for your answer. I do not want to hardcode it since I have customers in the US so I want the date format to follow the language of the customer. Isn't this supposed to be the default behavior?

Yenthe Van Ginneken (Mainframe Monkey)

I cannot comment your answer due to limited Karma. Please see my comment above.

Yenthe Van Ginneken (Mainframe Monkey)

@Fotis hmm yes I don't like it hardcoded either. The default behaviour *should* be that the report takes the dateformat that you chose as language but this doesn't seem to be the case. You could open a report for this at https://github.com/odoo/odoo/issues/ with some luck they'll fix it..

Fotis Dimanidis
Autor

Yenthe I have tried both your suggestions and none seemed to work for me. I remind that I need the edit in invoice PDFs. i tried changing both sale.report_saleorder_document and account.report_invoice_document qweb templates but it had no effect. I have filed a bug report: https://github.com/odoo/odoo/issues/4618

Yenthe Van Ginneken (Mainframe Monkey)

Have you tried this with an invoice that existed before you modified or after you've modified the QWeb? An invoice lay-out never changes after it has been created.. not even if you changed the QWeb so my guess is you didn't make a new invoice after you changed the dateformat on the QWeb template. And good that you created a report for this!

Avatar
Yenthe Van Ginneken (Mainframe Monkey)
Mejor respuesta

Hi Fotis

To fix this you have two options.
The first is to go to settings > Reports, find the correct QWeb report and open it. Modify the line <p t-field="o.date_order"/> here to <p t-field="o.date_order" t-field-options="{&quot;format&quot;: &quot;dd/MM/YYYY&quot;}"/>

The second option is to do it permanently (also when you update your module) by modifying the XML file for the report where the dateformat is wrong.
For example on a sale order you will see this in the code: (report_saleorder.xml under /addons/sale/views/)

<p t-field="o.date_order">

If you then modify it like this:

<p t-field="o.date_order" t-field-options="{&quot;format&quot;: &quot;dd/MM/YYYY&quot;}"/>

You will get a dateformat of d/m/Y in place of m/d/Y.

 

1
Avatar
Descartar
Avatar
Xabier Arrabal Amat
Mejor respuesta

The best solution to keep the date localization is to do the following:

<p t-field="o.your_datetime_field" t-field-options='{"widget": "date"}'/>

0
Avatar
Descartar
Avatar
Fotis Dimanidis
Autor Mejor respuesta

Turns out this issue happens only to existing invoices. New invoice dates seem to be fine after changing date format settings. I have updated my github issue description to include this improvement for existing invoices as well.

0
Avatar
Descartar
Yenthe Van Ginneken (Mainframe Monkey)

This is not a bug or an error. Changing an approved invoice is technically even illegal as it is an official and finale document.

¿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 can we change date view format from dd/mm/yyyy to mm/dd/yyyy Resuelto
date format
Avatar
Avatar
Avatar
Avatar
4
oct 25
80847
Date format in Dashboard Resuelto
date format dashboard
Avatar
Avatar
2
may 25
2655
How to change display of a specific datetime field in a different format on list and form view?
date format datetime
Avatar
0
oct 23
3964
Odoo 16 email template date format
date format odoo16features
Avatar
Avatar
2
oct 23
3444
Date format not changing on follow up reports
date format reporting
Avatar
0
sept 23
2152
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