[FIX] res.partner.bank: respect company restrictions when assign parent account for new bank GL account

bzr revid: odo@openerp.com-20120309105659-ijcyersotc96uwp8
This commit is contained in:
Olivier Dony 2012-03-09 11:56:59 +01:00
parent 65c71111fb
commit 8c3890a893
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ class bank(osv.osv):
# Find the code and parent of the bank account to create
dig = 6
current_num = 1
ids = obj_acc.search(cr, uid, [('type','=','liquidity')], context=context)
ids = obj_acc.search(cr, uid, [('type','=','liquidity'), ('company_id', '=', bank.company_id.id)], context=context)
# No liquidity account exists, no template available
if not ids: continue