[FIX]: select only posted (valid) entries

bzr revid: mga@tinyerp.co.in-20101030185438-eq2it7zoiv2t6hah
This commit is contained in:
Mantavya Gajjar 2010-10-31 00:24:38 +05:30
parent aee10ece66
commit c8bf3b0e55
1 changed files with 2 additions and 2 deletions

View File

@ -404,7 +404,7 @@ class account_voucher(osv.osv):
account_type = 'receivable'
if not context.get('move_line_ids', False):
ids = move_line_pool.search(cr, uid, [('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context)
ids = move_line_pool.search(cr, uid, [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context)
else:
ids = context['move_line_ids']
ids.reverse()
@ -926,4 +926,4 @@ class account_bank_statement_line(osv.osv):
account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: