strip internal spaces in HTS number
The WPINT API requires a 10-digit HTS number without any spaces, while the source number may contain spaces. Our use of 'strip()' is insufficient as it only removes leading and trailing spaces, but not spaces inside the number. We need to do replace(' ', '') instead. Related: SYS#5415
This commit is contained in:
parent
3ebb9425d0
commit
f85e288cf8
|
@ -152,7 +152,7 @@ class DPDeliveryCarrier(models.Model):
|
||||||
else:
|
else:
|
||||||
raise Warning('Product %s has no Country of Origin defined' % (ptempl.name))
|
raise Warning('Product %s has no Country of Origin defined' % (ptempl.name))
|
||||||
weight = ptempl.weight
|
weight = ptempl.weight
|
||||||
hts = ptmpl.customs_code.strip()
|
hts = ptmpl.customs_code.replace(' ', '')
|
||||||
desc = ptmpl.customs_description_en
|
desc = ptmpl.customs_description_en
|
||||||
if line.procurement_id and line.procurement_id.sale_line_id:
|
if line.procurement_id and line.procurement_id.sale_line_id:
|
||||||
price_unit = line.procurement_id.sale_line_id.price_unit
|
price_unit = line.procurement_id.sale_line_id.price_unit
|
||||||
|
|
Loading…
Reference in New Issue