mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] delivery_stamps: to Odoo 13.0
This commit is contained in:
@@ -1 +1,3 @@
|
|||||||
|
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
|
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Stamps.com (USPS) Shipping',
|
'name': 'Stamps.com (USPS) Shipping',
|
||||||
'summary': 'Send your shippings through Stamps.com and track them online.',
|
'summary': 'Send your shippings through Stamps.com and track them online.',
|
||||||
'version': '12.0.2.0.0',
|
'version': '13.0.1.0.0',
|
||||||
'author': "Hibou Corp.",
|
'author': "Hibou Corp.",
|
||||||
'category': 'Warehouse',
|
'category': 'Warehouse',
|
||||||
'license': 'AGPL-3',
|
'license': 'OPL-1',
|
||||||
'images': [],
|
'images': [],
|
||||||
'website': "https://hibou.io",
|
'website': "https://hibou.io",
|
||||||
'description': """
|
'description': """
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||||
|
|
||||||
from . import delivery_stamps
|
from . import delivery_stamps
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
@@ -158,8 +160,8 @@ class ProviderStamps(models.Model):
|
|||||||
|
|
||||||
ret_val = service.create_shipping()
|
ret_val = service.create_shipping()
|
||||||
ret_val.ShipDate = date_planned.strftime('%Y-%m-%d') if date_planned else date.today().isoformat()
|
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.From = self._stamps_address(service, shipper)
|
||||||
ret_val.ToZIPCode = recipient.zip.split('-')[0]
|
ret_val.To = self._stamps_address(service, recipient)
|
||||||
ret_val.PackageType = self._stamps_package_type()
|
ret_val.PackageType = self._stamps_package_type()
|
||||||
ret_val.WeightLb = weight
|
ret_val.WeightLb = weight
|
||||||
ret_val.ContentType = 'Merchandise'
|
ret_val.ContentType = 'Merchandise'
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<field name="model">product.packaging</field>
|
<field name="model">product.packaging</field>
|
||||||
<field name="inherit_id" ref="delivery.product_packaging_delivery_form"/>
|
<field name="inherit_id" ref="delivery.product_packaging_delivery_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='max_weight']" position='after'>
|
<xpath expr="//field[@name='length']" position='after'>
|
||||||
<field name="stamps_cubic_pricing"/>
|
<field name="stamps_cubic_pricing"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
Reference in New Issue
Block a user