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:
|
||||
raise Warning('Product %s has no Country of Origin defined' % (ptempl.name))
|
||||
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 = {
|
||||
'origin_country': orig,
|
||||
'description': line.name,
|
||||
'hs_tariff_number': hts,
|
||||
'quantity': q,
|
||||
'value_amount': line.price_unit,
|
||||
'value_amount': price_unit,
|
||||
'net_weight': weight,
|
||||
}
|
||||
return res
|
||||
|
|
Loading…
Reference in New Issue