[MIG] delivery_gso: for Odoo 14.0

This commit is contained in:
Connor Christian
2020-11-18 13:11:00 -05:00
committed by Jared Kipe
parent edd1e5c947
commit 46103eaaff
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
{ {
'name': 'Golden State Overnight (gso.com) Shipping', 'name': 'Golden State Overnight (gso.com) Shipping',
'summary': 'Send your shippings through gso.com and track them online.', 'summary': 'Send your shippings through gso.com and track them online.',
'version': '11.0.1.0.0', 'version': '14.0.1.0.0',
'author': "Hibou Corp.", 'author': "Hibou Corp.",
'category': 'Warehouse', 'category': 'Warehouse',
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@@ -20,7 +20,7 @@ class ProductPackaging(models.Model):
class ProviderGSO(models.Model): class ProviderGSO(models.Model):
_inherit = 'delivery.carrier' _inherit = 'delivery.carrier'
delivery_type = fields.Selection(selection_add=[('gso', 'gso.com')]) delivery_type = fields.Selection(selection_add=[('gso', 'gso.com')], ondelete={'gso': 'cascade'})
gso_username = fields.Char(string='gso.com Username', groups='base.group_system') gso_username = fields.Char(string='gso.com Username', groups='base.group_system')
gso_password = fields.Char(string='gso.com Password', groups='base.group_system') gso_password = fields.Char(string='gso.com Password', groups='base.group_system')
gso_account_number = fields.Char(string='gso.com Account Number', groups='base.group_system') gso_account_number = fields.Char(string='gso.com Account Number', groups='base.group_system')
@@ -139,7 +139,7 @@ class ProviderGSO(models.Model):
package_type = self.gso_default_packaging_id package_type = self.gso_default_packaging_id
else: else:
package_type = package.packaging_id package_type = package.packaging_id
return {'Length': package_type.length, 'Width': package_type.width, 'Height': package_type.height} return {'Length': package_type.packaging_length, 'Width': package_type.width, 'Height': package_type.height}
def _gso_convert_weight(self, weight_in_kg): def _gso_convert_weight(self, weight_in_kg):
# m(lb) = m(kg) / 0.45359237 # m(lb) = m(kg) / 0.45359237