[FIX] Account_payment : Corrected the method which was retuning bank according to the partner

bzr revid: jvo@tinyerp.com-20110624113240-c8j2neggfsrp2qxo
This commit is contained in:
Luc De Meyer
2011-06-24 17:02:40 +05:30
committed by Jay Vora (OpenERP)
parent f813eec0aa
commit 2d5d996981
+1 -1
View File
@@ -104,7 +104,7 @@ class account_move_line(osv.osv):
if bank.state in bank_type:
line2bank[line.id] = bank.id
break
if line.id not in line2bank and line.partner_id.bank_ids:
if not line2bank[line.id] and line.partner_id.bank_ids:
line2bank[line.id] = line.partner_id.bank_ids[0].id
else:
raise osv.except_osv(_('Error !'), _('No partner defined on entry line'))