diff --git a/account_payment_order/wizard/account_payment_line_create.py b/account_payment_order/wizard/account_payment_line_create.py index 9af6bbe67..287568bd3 100644 --- a/account_payment_order/wizard/account_payment_line_create.py +++ b/account_payment_order/wizard/account_payment_line_create.py @@ -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":