projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
db2c856
b9f57df
)
[FIX] account: account_bank.post_write() accepts a single id, just like write().
author
Vo Minh Thu
<vmt@openerp.com>
Tue, 15 Nov 2011 12:42:26 +0000
(13:42 +0100)
committer
Vo 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
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
addons/account/account_bank.py
index
2a9e432
,
6833946
..
acf070a
---
1
/
addons/account/account_bank.py
---
2
/
addons/account/account_bank.py
+++ b/
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