[IMP]pms: create draft invoice from folios with last checkout date

This commit is contained in:
Darío Lodeiros
2023-02-04 11:06:18 +01:00
parent 3ff22c1bb7
commit 608918d740

View File

@@ -1937,6 +1937,7 @@ class PmsFolio(models.Model):
else "invoice_date_due"
)
for vals in invoice_vals_list:
vals["date"] = invoice_date
vals[key_field] = invoice_date
# 3) Create invoices.
@@ -2076,6 +2077,7 @@ class PmsFolio(models.Model):
if self.external_reference:
ref += " - " + self.external_reference
invoice_vals = {
"name": "/",
"ref": ref,
"move_type": "out_invoice",
"narration": self.note,