Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2874 Vistas

Hello, is there a way to make invoices' date be the same as sales orders' date? I am using odoo 13

the link no longer aplly to Odoo 13. Help

https://www.odoo.com/forum/help-1/invoice-date-same-as-sales-order-date-110292#


Avatar
Descartar

Theirs the manual method .... just enter the invoice date manually before Validating the Invoice.

Autor

i know this, but is there a way to do it automatically, that some changes in sale.py code thanks

Mejor respuesta

Hi,

You may try this code,

class SaleOrder(models.Model):
_inherit = 'sale.order'
def _prepare_invoice(self):
res = super(SaleOrder, self)._prepare_invoice()
res['invoice_date'] = self.date_order
return res
Regards
Avatar
Descartar