account_voucher: Can pay Sales Receipt multiple times

bzr revid: ara@tinyerp.com-20110404065741-wxp9okp2exjh0kvn
This commit is contained in:
ARA (OpenERP) 2011-04-04 12:27:41 +05:30
parent aaac69b7fa
commit 0f76f46675
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ class account_voucher(osv.osv):
paid = False
for voucher in self.browse(cr, uid, ids, context=context):
for line in voucher.move_ids:
if line.reconcile_id and (line.account_id.user_type.name, 'in', ('receivable', 'payable')):
if (line.account_id.type, 'in', ('receivable', 'payable')) and line.reconcile_id:
paid = True
return paid