[IMP] account: in invoice set due_date value to invoice_date if due_date is not set at time of invoice validation

This commit is contained in:
Axay Javiya
2017-09-29 13:50:58 +02:00
committed by qdp-odoo
parent a2da1df78e
commit 28c3ffaa96
+2
View File
@@ -1069,6 +1069,8 @@ class AccountInvoice(models.Model):
if not inv.date_invoice:
inv.with_context(ctx).write({'date_invoice': fields.Date.context_today(self)})
if not inv.date_due:
inv.with_context(ctx).write({'date_due': inv.date_invoice})
company_currency = inv.company_id.currency_id
# create move lines (one per invoice line + eventual taxes and analytic lines)