customs_declaration: use price from sale order, not move line
This commit is contained in:
parent
ef447dd8f9
commit
0abc037100
|
@ -126,12 +126,16 @@ class SCDeliveryCarrier(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
|
||||||
|
if line.procurement_id and line.procurement_id.sale_line_id:
|
||||||
|
price_unit = line.procurement_id.sale_line_id.price_unit
|
||||||
|
else:
|
||||||
|
raise Warning('Line has no procurement or procurement no sale order line?!?')
|
||||||
res = {
|
res = {
|
||||||
'origin_country': orig,
|
'origin_country': orig,
|
||||||
'description': line.name,
|
'description': line.name,
|
||||||
'hs_tariff_number': hts,
|
'hs_tariff_number': hts,
|
||||||
'quantity': q,
|
'quantity': q,
|
||||||
'value_amount': line.price_unit,
|
'value_amount': price_unit,
|
||||||
'net_weight': weight,
|
'net_weight': weight,
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Reference in New Issue