[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
This commit is contained in:
Mustufa Rangwala 2010-09-22 12:27:27 +05:30
parent 23f99c1681
commit 5fc2cfcb0d
1 changed files with 2 additions and 2 deletions

View File

@ -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