From cf6c8e624eeb09c098362168d85c9bf5d2350f00 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Tue, 4 Jun 2013 16:48:54 +0200 Subject: [PATCH] [FIX] Only allow posted move lines in payment order --- account_banking_payment/model/payment_order_create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_banking_payment/model/payment_order_create.py b/account_banking_payment/model/payment_order_create.py index b39a6bf2e..24a2e1dd6 100644 --- a/account_banking_payment/model/payment_order_create.py +++ b/account_banking_payment/model/payment_order_create.py @@ -36,7 +36,6 @@ class payment_order_create(orm.TransientModel): self, cr, uid, payment_order, domain, context=None): if payment_order.payment_order_type == 'payment': domain += [ - ('reconcile_id', '=', False), ('account_id.type', '=', 'payable'), ('amount_to_pay', '>', 0) ] @@ -59,6 +58,7 @@ class payment_order_create(orm.TransientModel): cr, uid, context['active_id'], context=context) # Search for move line to pay: domain = [ + ('move_id.state', '=', 'posted'), ('reconcile_id', '=', False), ('company_id', '=', payment.mode.company_id.id), ]