[FIX] account: account_bank.post_write() accepts a single id, just like write().
authorVo Minh Thu <vmt@openerp.com>
Tue, 15 Nov 2011 12:42:26 +0000 (13:42 +0100)
committerVo Minh Thu <vmt@openerp.com>
Tue, 15 Nov 2011 12:42:26 +0000 (13:42 +0100)
bzr revid: vmt@openerp.com-20111115124226-v7lb3r5kpr1p3eis

1  2 
addons/account/account_bank.py

@@@ -42,8 -42,12 +42,12 @@@ class bank(osv.osv)
          return (bank.bank_name or '') + ' ' + bank.acc_number
  
      def post_write(self, cr, uid, ids, context={}):
 -        obj_acc = self.pool.get('account.account')
 -        obj_data = self.pool.get('ir.model.data')
 -
+         if isinstance(ids, (int, long)):
+           ids = [ids]
 +        obj_acc = self.pool.get('account.account')
 +        obj_data = self.pool.get('ir.model.data')
++
          for bank in self.browse(cr, uid, ids, context):
              if bank.company_id and not bank.journal_id:
                  # Find the code and parent of the bank account to create