[FIX] account_payment: lin2bank correct fallback condition
This commit is contained in:
parent
57b48602fb
commit
c77c3f934c
|
@ -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.get(line.id) and line.partner_id.bank_ids:
|
||||
line2bank[line.id] = line.partner_id.bank_ids[0].id
|
||||
else:
|
||||
raise osv.except_osv(_('Error!'), _('There is no partner defined on the entry line.'))
|
||||
|
|
Loading…
Reference in New Issue