Merge branch 'fix/12.0/delivery_stamps__multi_international' into '12.0-test'

fix/12.0/delivery_stamps__multi_international into 12.0-test

See merge request hibou-io/hibou-odoo/suite!1030
This commit is contained in:
Hibou Bot
2021-09-14 17:04:10 +00:00
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'