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

@@ -11,9 +11,9 @@ class PartnerShippingAccount(models.Model):
ups_zip = fields.Char(string='UPS Account ZIP')
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:
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:
raise ValidationError('UPS requires the 5 digit account ZIP.')