[FIX] account_payment_order: exclude cancel journal entries

Always exclude cancel journal entries in the wizard that adds payment lines to payment order.
This commit is contained in:
Alexis de Lattre
2024-04-09 10:11:11 +02:00
parent a98223584a
commit bf868f475a

View File

@@ -77,6 +77,8 @@ class AccountPaymentLineCreate(models.TransientModel):
domain += [("partner_id", "in", self.partner_ids.ids)]
if self.target_move == "posted":
domain += [("move_id.state", "=", "posted")]
else:
domain += [("move_id.state", "in", ("draft", "posted"))]
if not self.allow_blocked:
domain += [("blocked", "!=", True)]
if self.date_type == "due":