mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
IMP delivery_partner_dhl Allow 8-10 digit account numbers.
This commit is contained in:
committed by
Leighton Pennicott
parent
e7e649d3ab
commit
0e80470d39
@@ -10,8 +10,8 @@ class PartnerShippingAccount(models.Model):
|
||||
delivery_type = fields.Selection(selection_add=[('dhl', 'DHL')])
|
||||
|
||||
def dhl_check_validity(self):
|
||||
m = re.search(r'^\d{10}$', self.name or '')
|
||||
m = re.search(r'^(\d{8}|\d{9}|\d{10})$', self.name or '')
|
||||
if not m:
|
||||
raise ValidationError('DHL Account numbers must be 10 decimal numbers.')
|
||||
raise ValidationError('DHL Account numbers must be 8-10 decimal numbers.')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user