aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgsxws.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/gsxws.py b/gsxws.py
index 9d4054b..ccc0f18 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -607,8 +607,16 @@ class Returns(GsxObject):
dt = self._make_type('ns1:registerPartsForBulkReturnRequestType')
self.data['bulkReturnOrder'] = parts
dt.bulkPartsRegistrationRequest = self.data
+
+ result = self.submit('RegisterPartsForBulkReturn', dt, 'bulkPartsRegistrationData')
+
+ pdf = base64.b64decode(result.packingList)
+ of = tempfile.NamedTemporaryFile(suffix='.pdf', delete=False)
+ of.write(pdf)
- return self.submit('RegisterPartsForBulkReturn', dt, 'bulkPartsRegistrationData')
+ result.packingList = of.name
+
+ return result
class Part(GsxObject):
def lookup(self):