콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2896 화면

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#


아바타
취소

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

작성자

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

베스트 답변

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
아바타
취소