mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms: search downpayments only in out invoices not reversed
This commit is contained in:
@@ -1062,6 +1062,7 @@ class FolioSaleLine(models.Model):
|
||||
if self.is_downpayment:
|
||||
downpayment_invoice = self.folio_id.move_ids.filtered(
|
||||
lambda x: x.payment_state != "reversed"
|
||||
and x.move_type == "out_invoice"
|
||||
and x.line_ids.filtered(lambda l: l.folio_line_ids == self)
|
||||
)
|
||||
name = self.name + " (" + downpayment_invoice.name + ")"
|
||||
|
||||
Reference in New Issue
Block a user