[FIX] account: account_bank.post_write() accepts a single id, just like write().
bzr revid: vmt@openerp.com-20111115124226-v7lb3r5kpr1p3eis
This commit is contained in:
commit
b860abd1c2
|
@ -42,8 +42,12 @@ class bank(osv.osv):
|
||||||
return (bank.bank_name or '') + ' ' + bank.acc_number
|
return (bank.bank_name or '') + ' ' + bank.acc_number
|
||||||
|
|
||||||
def post_write(self, cr, uid, ids, context={}):
|
def post_write(self, cr, uid, ids, context={}):
|
||||||
|
if isinstance(ids, (int, long)):
|
||||||
|
ids = [ids]
|
||||||
|
|
||||||
obj_acc = self.pool.get('account.account')
|
obj_acc = self.pool.get('account.account')
|
||||||
obj_data = self.pool.get('ir.model.data')
|
obj_data = self.pool.get('ir.model.data')
|
||||||
|
|
||||||
for bank in self.browse(cr, uid, ids, context):
|
for bank in self.browse(cr, uid, ids, context):
|
||||||
if bank.company_id and not bank.journal_id:
|
if bank.company_id and not bank.journal_id:
|
||||||
# Find the code and parent of the bank account to create
|
# Find the code and parent of the bank account to create
|
||||||
|
|
Loading…
Reference in New Issue