mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: avoid invoice with auto date minor that today
This commit is contained in:
@@ -1903,6 +1903,8 @@ class PmsFolio(models.Model):
|
||||
.search([("sale_line_ids", "in", list(lines_to_invoice.keys()))])
|
||||
.mapped("checkout")
|
||||
) + datetime.timedelta(days=margin_days_autoinvoice)
|
||||
if invoice_date < datetime.date.today():
|
||||
invoice_date = datetime.date.today()
|
||||
if partner_invoice_policy == "month_day":
|
||||
month_day = (
|
||||
self.pms_property_id.invoicing_month_day
|
||||
|
||||
Reference in New Issue
Block a user