[FIX] res_currency: When passed integer 'ids' as parameter to read() of res_currency...
authorRavi Gohil (Open ERP) <rgo@tinyerp.com>
Tue, 28 Feb 2012 10:39:54 +0000 (16:09 +0530)
committerRavi Gohil (Open ERP) <rgo@tinyerp.com>
Tue, 28 Feb 2012 10:39:54 +0000 (16:09 +0530)
bzr revid: rgo@tinyerp.com-20120228103954-2gx0yrnvbjy59q6m

bin/addons/base/res/res_currency.py

index 71a11f9..398aedb 100644 (file)
@@ -78,6 +78,8 @@ class res_currency(osv.osv):
     _constraints = [(_check_rounding, "The rounding factor cannot be 0 !", ['rounding'])]
 
     def read(self, cr, user, ids, fields=None, context=None, load='_classic_read'):
+        if not isinstance(ids, list):
+            ids = [ids]
         res=super(osv.osv, self).read(cr, user, ids, fields, context, load)
         for r in res:
             if r.__contains__('rate_ids'):