Fix wrong sort key method introduce by removing py3warn

This commit is contained in:
Cédric Krier committed 2011-07-28 11:57:25 +02:00
1 parent 7d1efe5818
commit 8850c19af1
1 file changed
+1 -1
+1 -1
View File
@@ -240,7 +240,7 @@ class PurchaseRequest(ModelSQL, ModelView):
i.sort(lambda r,s: cmp(r['supply_date'],s['supply_date']))
# Update new requests to take existing requests into account
new_requests.sort(key=operator.attrgetter('supply_date'))
new_requests.sort(key=operator.itemgetter('supply_date'))
for new_req in new_requests:
for old_req in existing_req.get((new_req['product'].id,
new_req['warehouse']), []):