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 14.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
'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': '13.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'author': "Hibou Corp.",
|
'author': "Hibou Corp.",
|
||||||
'category': 'Warehouse',
|
'category': 'Warehouse',
|
||||||
'license': 'OPL-1',
|
'license': 'OPL-1',
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ class ProductPackaging(models.Model):
|
|||||||
class ProviderStamps(models.Model):
|
class ProviderStamps(models.Model):
|
||||||
_inherit = 'delivery.carrier'
|
_inherit = 'delivery.carrier'
|
||||||
|
|
||||||
delivery_type = fields.Selection(selection_add=[('stamps', 'Stamps.com (USPS)')])
|
delivery_type = fields.Selection(selection_add=[('stamps', 'Stamps.com (USPS)')],
|
||||||
|
ondelete={'stamps': 'set default'})
|
||||||
|
|
||||||
stamps_username = fields.Char(string='Stamps.com Username', groups='base.group_system')
|
stamps_username = fields.Char(string='Stamps.com Username', groups='base.group_system')
|
||||||
stamps_password = fields.Char(string='Stamps.com Password', groups='base.group_system')
|
stamps_password = fields.Char(string='Stamps.com Password', groups='base.group_system')
|
||||||
@@ -104,7 +105,8 @@ class ProviderStamps(models.Model):
|
|||||||
package_type = self.stamps_default_packaging_id
|
package_type = self.stamps_default_packaging_id
|
||||||
else:
|
else:
|
||||||
package_type = package.packaging_id
|
package_type = package.packaging_id
|
||||||
return package_type.length, package_type.width, package_type.height
|
# TODO should convert to inches if it is not already
|
||||||
|
return package_type.packaging_length, package_type.width, package_type.height
|
||||||
|
|
||||||
def _get_stamps_service(self):
|
def _get_stamps_service(self):
|
||||||
sudoself = self.sudo()
|
sudoself = self.sudo()
|
||||||
|
|||||||
@@ -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='length']" position='after'>
|
<xpath expr="//field[@name='barcode']" position='before'>
|
||||||
<field name="stamps_cubic_pricing"/>
|
<field name="stamps_cubic_pricing"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
Reference in New Issue
Block a user