remove spaces from HTS numbers

This commit is contained in:
Harald Welte 2021-02-15 10:59:55 +01:00
parent 0abc037100
commit 35b7575e54
1 changed files with 2 additions and 0 deletions

View File

@ -130,6 +130,8 @@ class SCDeliveryCarrier(models.Model):
price_unit = line.procurement_id.sale_line_id.price_unit price_unit = line.procurement_id.sale_line_id.price_unit
else: else:
raise Warning('Line has no procurement or procurement no sale order line?!?') raise Warning('Line has no procurement or procurement no sale order line?!?')
# remove any spaces, as DHL is not happy about them
hts = ''.join(c for c in hts if c.isdigit())
res = { res = {
'origin_country': orig, 'origin_country': orig,
'description': line.name, 'description': line.name,