From b9f57dfef7853bd81b775eba7d84c74c4b4e904d Mon Sep 17 00:00:00 2001 From: Yannick Vaucher <> Date: Tue, 15 Nov 2011 12:10:57 +0530 Subject: [PATCH] [FIX] account : account_bank - post_write method not single id safe lp bug: https://launchpad.net/bugs/888135 fixed bzr revid: bde@tinyerp.com-20111115064057-osliuwprypaawyy5 --- addons/account/account_bank.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index 2a9e432894f..6833946998b 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -44,6 +44,10 @@ class bank(osv.osv): 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] + 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