[FIX]pms: folio sale line compute invoice state filter

This commit is contained in:
Darío Lodeiros
2023-03-06 17:25:27 +01:00
parent 39a6dc6be3
commit 1df3bc2baf

View File

@@ -541,7 +541,7 @@ class FolioSaleLine(models.Model):
Note: Draft invoice are ignored on purpose, the 'to invoice' amount should
come only from the folio lines.
"""
for line in self.filtered("invoice_lines"):
for line in self:
amount_to_invoice = 0.0
if line.state != "draft":
# Note: do not use price_subtotal field as it returns