aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-05-20 16:21:46 +0300
committerFilipp Lepalaan <f@230.to>2013-05-20 16:21:46 +0300
commit79bc915381e981836d1807b5e1081324b2a09e4a (patch)
tree9dabf23ada3bdc5a9c9e696e51078e4d93bf8b23 /gsxws
parent827c62eed77440367cc6b631bb567e05d4ece713 (diff)
downloadpy-gsxws-79bc915381e981836d1807b5e1081324b2a09e4a.tar.gz
py-gsxws-79bc915381e981836d1807b5e1081324b2a09e4a.tar.bz2
py-gsxws-79bc915381e981836d1807b5e1081324b2a09e4a.zip
Fixing bulk returns
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/returns.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/gsxws/returns.py b/gsxws/returns.py
index 42c002f..977a4cb 100644
--- a/gsxws/returns.py
+++ b/gsxws/returns.py
@@ -100,18 +100,10 @@ class Return(GsxObject):
the registered parts.
The API returns the Bulk Return Id with the packing list.
"""
- 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)
- result.packingList = of.name
-
- return result
+ self.bulkReturnOrder = parts
+ self._submit("RegisterPartsForBulkReturnRequest", "RegisterPartsForBulkReturn",
+ "bulkPartsRegistrationData")
+ return self._req.objects[0]
def update_parts(self, confirmation, parts):
"""