merge from trunk

bzr revid: rga@tinyerp.com-20100920102311-elxge0e4wyx4af64
This commit is contained in:
RGA (OpenERP)
2010-09-20 15:53:11 +05:30
2 changed files with 5 additions and 8 deletions
+2 -2
View File
@@ -1335,8 +1335,8 @@
</record>
<record id="INR" model="res.currency">
<field name="name">INR</field>
<field name="code">Rs</field>
<field name="name">Rs</field>
<field name="code">INR</field>
<field name="symbol">Rs</field>
<field name="rounding">0.01</field>
<field name="accuracy">4</field>
+3 -6
View File
@@ -2268,12 +2268,9 @@ class orm(orm_template):
if groupby and fget[groupby]['type'] == 'many2one':
data_ids = self.search(cr, uid, [('id', 'in', alldata.keys())], order=groupby, context=context)
data_read = self.read(cr, uid, data_ids, groupby and [groupby] or ['id'], context=context)
# restore order of the search as read() uses the default _order:
data = []
for id in data_ids:
for rec in data_read:
if rec['id'] == id:
data.append(rec)
# restore order of the search as read() uses the default _order (this is only for groups, so the size of data_read shoud be small):
data_read.sort(lambda x,y: cmp(data_ids.index(x['id']), data_ids.index(y['id'])))
data = data_read
else:
data = self.read(cr, uid, alldata.keys(), groupby and [groupby] or ['id'], context=context)
if groupby: