dp_delivery_carrier: fix various typos in customs error path

This commit is contained in:
Harald Welte 2021-11-23 19:28:05 +01:00
parent 879ba64ed7
commit 042e3b73bd
1 changed files with 6 additions and 6 deletions

View File

@ -147,13 +147,13 @@ class DPDeliveryCarrier(models.Model):
raise Warning('Product Variant %s has no Country of Origin defined' % (product.name))
weight = product.weight
else:
if ptempl.x_country_of_origin:
orig = ptempl.x_country_of_origin.code
if ptmpl.x_country_of_origin:
orig = ptmpl.x_country_of_origin.code
else:
raise Warning('Product %s has no Country of Origin defined' % (ptempl.name))
weight = ptempl.weight
if not ptempl.customs_code:
raise Warning('Product %s has no Customs Code defined' % (templ.name))
raise Warning('Product %s has no Country of Origin defined' % (ptmpl.name))
weight = ptmpl.weight
if not ptmpl.customs_code:
raise Warning('Product %s has no Customs Code defined' % (ptmpl.name))
hts = ptmpl.customs_code.replace(' ', '')
desc = ptmpl.customs_description_en
if line.procurement_id and line.procurement_id.sale_line_id: