[FIX] delivery_stamps: multi rating with latest wsdl

Hibou Professional License
This commit is contained in:
Jared Kipe
2021-09-14 10:03:00 -07:00
parent 0545b5e77e
commit 48bed29111
4 changed files with 12 additions and 4 deletions

View File

@@ -1 +1,3 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from . import models

View File

@@ -1,10 +1,12 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
{
'name': 'Stamps.com (USPS) Shipping',
'summary': 'Send your shippings through Stamps.com and track them online.',
'version': '12.0.2.0.0',
'version': '12.0.2.0.1',
'author': "Hibou Corp.",
'category': 'Warehouse',
'license': 'AGPL-3',
'license': 'OPL-1',
'images': [],
'website': "https://hibou.io",
'description': """

View File

@@ -1 +1,3 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from . import delivery_stamps

View File

@@ -1,3 +1,5 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
import hashlib
from datetime import date
from logging import getLogger
@@ -158,8 +160,8 @@ class ProviderStamps(models.Model):
ret_val = service.create_shipping()
ret_val.ShipDate = date_planned.strftime('%Y-%m-%d') if date_planned else date.today().isoformat()
ret_val.FromZIPCode = shipper.zip.split('-')[0]
ret_val.ToZIPCode = recipient.zip.split('-')[0]
ret_val.From = self._stamps_address(service, shipper)
ret_val.To = self._stamps_address(service, recipient)
ret_val.PackageType = self._stamps_package_type()
ret_val.WeightLb = weight
ret_val.ContentType = 'Merchandise'