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

Invoice date same as sales order date

Suscribirse

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

Se marcó esta pregunta
invoicedatesalesorderodooV8
11 Respuestas
10614 Vistas
Avatar
Noah Alama

Hello, is there a way to make invoices' date be the same as sales orders' date?

We are using Odoo 8 and we have a big problem in terms of creating invoices for our customers and setting the invoice to have the sales order's date would save us so much time and trouble.

If no solution, can we at least change invoice date before printing? This is very labor intensive, but would also do the trick as well.

Thanks a lot for any help and please, if you have questions, don't hesitate to ask me.

0
Avatar
Descartar
Michael

How can this be achieved in Odoo 14?

Avatar
Qutechs, Ahmed M.Elmubarak
Mejor respuesta

Hello Again Noah :)

Actually the invoicing date takes the 'current date of pressing the create invoice button' and you can check this here in the wizard 

and this will be passed cross multiple functions starting from here. So to solve this you can change the value of this field 'invoice date' to the SO's date. Or you can modify the function that creates the invoice which you can modify the create dict from here 

Update:

Try to update this line to be as:

'date_invoice': order.date_order or order.create_date or context.get('date_invoice', False),

Hope this will give you some clues ...


1
Avatar
Descartar
Noah Alama
Autor

Hello Ahmed, thanks so much for answering my question. I do understand what you are talking about, but my Python skills are non-existent! Can you please give me lines or pieces of code to change, that would help me a lot.

Just tell me what files to change on my Odoo server, thanks a lot for all your efforts.

Qutechs, Ahmed M.Elmubarak

Hi, Actually I'vn't Odoo 8 instance right now , I'll try to update my answer later on when it is available ... /

Noah Alama
Autor

Thanks a lot for your very valuable help, I was looking at https://github.com/odoo/odoo/blob/8.0/addons/sale/sale.py#L205 in the hope of understanding where I can get the SO's date snippet, no luck, I have no idea where to start! :)

Qutechs, Ahmed M.Elmubarak

Hi, I've updated my answer. I'm still can't check this on v8, so check it and feedback :

Noah Alama
Autor

God bless you, it works :) :)

Qutechs, Ahmed M.Elmubarak

Glad that is works for you :)

Avatar
fasluca
Mejor respuesta

You can change 'invoice date' before you validate an invoice

or try this on code
add this line in 'def _prepare_invoice' function>>invoice_vals ={}

ie in sale.py file line no between 237-250

'date_invoice': order.order_date.date()


4
Avatar
Descartar
Noah Alama
Autor

Yes, this would work, but I'm interested in an automatic solution, with as little human intervention as possible.

Noah Alama
Autor

Thanks for your help.

Avatar
Budi Hartono
Mejor respuesta

Hello Noah,

Your question was the same as my question, but I currently use Odoo 11. I'm grateful for having found the answer from this thread, so I want to share my solution (for Odoo 11.0) instead of creating a new thread.

What I changed in the code is the confirmation_date value, I see that if I change the confirmation_date, the generated stock picking scheduled date will also have the same value, and that is what I need in my case. Then the confirmation date value will be assigned to invoice date as well when I create an invoice based on that sales order. The line affected in the code file is https://github.com/odoo/odoo/blob/11.0/addons/sale/models/sale.py#L523

I changed the code from

'confirmation_date': fields.Datetime.now()

into

'confirmation_date': self.date_order

that's all.

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
Generate invoice automatic when confirm sale in sales order
invoice odooV8
Avatar
Avatar
1
nov 16
8353
A new Due date invoices
invoice date
Avatar
0
mar 15
5930
Timesheet does not match to salesorder Resuelto
invoice timesheet salesorder
Avatar
Avatar
1
jun 25
3287
Revenue - set a different accounting date to date of invoice Resuelto
accounting invoice date
Avatar
Avatar
Avatar
Avatar
3
mar 25
7687
Invoice Date importing
invoice import date
Avatar
0
sept 24
1803
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