mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] delivery_partner_ups: migrate delivery_partner_module to Odoo 14.0
This commit is contained in:
@@ -21,7 +21,7 @@ class PartnerShippingAccount(models.Model):
|
|||||||
partner_id = fields.Many2one('res.partner', string='Partner', help='Leave blank to allow as a generic 3rd party shipper.')
|
partner_id = fields.Many2one('res.partner', string='Partner', help='Leave blank to allow as a generic 3rd party shipper.')
|
||||||
delivery_type = fields.Selection([
|
delivery_type = fields.Selection([
|
||||||
('other', 'Other'),
|
('other', 'Other'),
|
||||||
], string='Carrier', required=True)
|
], string='Carrier', required=True, default='other')
|
||||||
note = fields.Text(string='Internal Note')
|
note = fields.Text(string='Internal Note')
|
||||||
|
|
||||||
def name_get(self):
|
def name_get(self):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
'name': 'UPS Partner Shipping Accounts',
|
'name': 'UPS Partner Shipping Accounts',
|
||||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
'version': '13.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'category': 'Stock',
|
'category': 'Stock',
|
||||||
'sequence': 95,
|
'sequence': 95,
|
||||||
'summary': 'UPS Partner Shipping Accounts',
|
'summary': 'UPS Partner Shipping Accounts',
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from odoo.exceptions import ValidationError
|
|||||||
class PartnerShippingAccount(models.Model):
|
class PartnerShippingAccount(models.Model):
|
||||||
_inherit = 'partner.shipping.account'
|
_inherit = 'partner.shipping.account'
|
||||||
|
|
||||||
delivery_type = fields.Selection(selection_add=[('ups', 'UPS')])
|
delivery_type = fields.Selection(selection_add=[('ups', 'UPS')], ondelete={'ups': 'set default'})
|
||||||
ups_zip = fields.Char(string='UPS Account ZIP')
|
ups_zip = fields.Char(string='UPS Account ZIP')
|
||||||
|
|
||||||
def ups_check_validity(self):
|
def ups_check_validity(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user