[FIX] Only allow posted move lines in payment order

This commit is contained in:
Stefan Rijnhart
2013-06-04 16:48:54 +02:00
parent dc77f219ec
commit cf6c8e624e

View File

@@ -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),
]