From aaac69b7fa07ce0607c0d67ff76d9e979e8e71ce Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Thu, 31 Mar 2011 15:33:43 +0530 Subject: [PATCH] [FIX] account_voucher: Can pay Sales Receipt multiple times bzr revid: ara@tinyerp.com-20110331100343-bat5h6wxnqdqrigx --- addons/account_voucher/account_voucher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 7b177a99a6a..391a0d95b9f 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -145,13 +145,13 @@ class account_voucher(osv.osv): def _check_paid(self, cr, uid, ids, name, args, context=None): res = {} for id in ids: - res[id] = self.test_paid(cr, uid, [id]) + res[id] = self.test_paid(cr, uid, [id], context=context) return res - def test_paid(self, cr, uid, ids): + def test_paid(self, cr, uid, ids, context): recs = [] paid = False - for voucher in self.browse(cr, uid, ids): + 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')): paid = True