From 2d42cfd7246af67ec91da44dfbd32b5bcbff69d9 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 9 Apr 2024 10:33:59 +0200 Subject: [PATCH] [FIX] account_payment_order: exclude cancel journal entries Always exclude cancel journal entries in the wizard that adds payment lines to payment order. --- account_payment_order/wizard/account_payment_line_create.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/account_payment_order/wizard/account_payment_line_create.py b/account_payment_order/wizard/account_payment_line_create.py index ac062c62f76..7169a3a07e6 100644 --- a/account_payment_order/wizard/account_payment_line_create.py +++ b/account_payment_order/wizard/account_payment_line_create.py @@ -78,6 +78,8 @@ def _prepare_move_line_domain(self): 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":