MIG delivery_partner_ups to 12.0

This commit is contained in:
Jared Kipe
2019-04-02 10:41:41 -07:00
committed by Leo Pinedo
parent 9dfd4006c4
commit 772e02c5eb
2 changed files with 3 additions and 3 deletions

View File

@@ -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': '11.0.1.0.0', 'version': '12.0.1.0.0',
'category': 'Stock', 'category': 'Stock',
'sequence': 95, 'sequence': 95,
'summary': 'UPS Partner Shipping Accounts', 'summary': 'UPS Partner Shipping Accounts',

View File

@@ -11,9 +11,9 @@ class PartnerShippingAccount(models.Model):
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):
m = re.search('^[\dA-Z]{6}$', self.name or '') m = re.search(r'^[\dA-Z]{6}$', self.name or '')
if not m: if not m:
raise ValidationError('UPS Account numbers must be 6 Alpha-numeric characters.') raise ValidationError('UPS Account numbers must be 6 Alpha-numeric characters.')
m = re.search('^\d{5}$', self.ups_zip or '') m = re.search(r'^\d{5}$', self.ups_zip or '')
if not m: if not m:
raise ValidationError('UPS requires the 5 digit account ZIP.') raise ValidationError('UPS requires the 5 digit account ZIP.')