added a batch retrieve method
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Nov 2007 13:38:02 +0000 (13:38 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Nov 2007 13:38:02 +0000 (13:38 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8114 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/python/oils/utils/csedit.py

index 16fd028..c0c8cfd 100644 (file)
@@ -20,7 +20,7 @@ from osrf.ses import osrfClientSession
 from oils.const import *
 import re
 
-ACTIONS = ['create', 'retrieve', 'update', 'delete', 'search']
+ACTIONS = ['create', 'retrieve', 'batch_retrieve', 'update', 'delete', 'search']
 
 class CSEditor(object):
     def __init__(self, **args):
@@ -143,6 +143,11 @@ class CSEditor(object):
         if action == 'search':
             method = method.replace('$', '.atomic')
 
+        if action == 'batch_retrieve':
+            method = method.replace('batch_retrieve', 'search')
+            method += '.atomic'
+            arg = {'id' : arg}
+
         params = [arg];
         if len(options.keys()):
             params.append(options)