From 5fc2cfcb0d34682b4ce14b1bdb435c61230aad27 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 22 Sep 2010 12:27:27 +0530 Subject: [PATCH] [FIX] Account: account move line => If partner is not available in move lines and we try to reconcile it bzr revid: mra@mra-laptop-20100922065727-id3cf8eki1hqakbv --- addons/account/account_move_line.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 322c38875ec..4ac854a7cd3 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -799,8 +799,8 @@ class account_move_line(osv.osv): wf_service.trg_trigger(uid, 'account.move.line', id, cr) if lines and lines[0]: - partner_id = lines[0].partner_id.id - if context and context.get('stop_reconcile', False): + partner_id = lines[0].partner_id and lines[0].partner_id.id or False + if partner_id and context and context.get('stop_reconcile', False): self.pool.get('res.partner').write(cr, uid, [partner_id], {'last_reconciliation_date': time.strftime('%Y-%m-%d %H:%M:%S')}) return r_id