|
|
|
@ -195,6 +195,9 @@ class DPDeliveryCarrier(models.Model):
|
|
|
|
|
'EUR', customer_reference=pickings.name, contents=wpi_content)
|
|
|
|
|
# actually create the order + download the label
|
|
|
|
|
wpi_res = wpi.api_create_order([wpi_item], 'Max Mustermann')
|
|
|
|
|
if not 'shipments' in wpi_res:
|
|
|
|
|
_logger.error("Warenpost International failed to create shipment: %s", wpi_res)
|
|
|
|
|
raise Warning("Warenpost International failed to create shipment: %s", wpi_res)
|
|
|
|
|
wpi_res_item = wpi_res['shipments'][0]['items'][0]
|
|
|
|
|
png = wpi.api_get_item_label(wpi_res_item['id'], 'image/png')
|
|
|
|
|
# build result dict
|
|
|
|
|