Browse Source

dp_delivery_carrier: fix various typos in customs error path

master
Harald Welte 1 week ago
parent
commit
042e3b73bd
  1. 12
      models/dp_delivery_carrier.py

12
models/dp_delivery_carrier.py

@ -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:

Loading…
Cancel
Save