mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] delivery_gso: for Odoo 14.0
This commit is contained in:
committed by
Jared Kipe
parent
edd1e5c947
commit
46103eaaff
@@ -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',
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user