mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] delivery_fedex_hibou: get price per variant and fix reference to shipper_warehouse.partner_id
This commit is contained in:
committed by
Jared Kipe
parent
d5818ca569
commit
4e7651e51a
@@ -274,7 +274,7 @@ class DeliveryFedex(models.Model):
|
|||||||
commodity_country_of_manufacture = picking.picking_type_id.warehouse_id.partner_id.country_id.code
|
commodity_country_of_manufacture = picking.picking_type_id.warehouse_id.partner_id.country_id.code
|
||||||
|
|
||||||
for operation in picking.move_line_ids:
|
for operation in picking.move_line_ids:
|
||||||
commodity_amount = operation.move_id.sale_line_id.price_reduce_taxinc or operation.product_id.list_price
|
commodity_amount = operation.move_id.sale_line_id.price_reduce_taxinc or operation.product_id.lst_price
|
||||||
total_commodities_amount += (commodity_amount * operation.qty_done)
|
total_commodities_amount += (commodity_amount * operation.qty_done)
|
||||||
commodity_description = operation.product_id.name
|
commodity_description = operation.product_id.name
|
||||||
commodity_number_of_piece = '1'
|
commodity_number_of_piece = '1'
|
||||||
@@ -285,7 +285,7 @@ class DeliveryFedex(models.Model):
|
|||||||
commodity_harmonized_code = operation.product_id.hs_code or ''
|
commodity_harmonized_code = operation.product_id.hs_code or ''
|
||||||
srm.commodities(_convert_curr_iso_fdx(commodity_currency.name), commodity_amount, commodity_number_of_piece, commodity_weight_units, commodity_weight_value, commodity_description, commodity_country_of_manufacture, commodity_quantity, commodity_quantity_units, commodity_harmonized_code)
|
srm.commodities(_convert_curr_iso_fdx(commodity_currency.name), commodity_amount, commodity_number_of_piece, commodity_weight_units, commodity_weight_value, commodity_description, commodity_country_of_manufacture, commodity_quantity, commodity_quantity_units, commodity_harmonized_code)
|
||||||
srm.customs_value(_convert_curr_iso_fdx(commodity_currency.name), total_commodities_amount, "NON_DOCUMENTS")
|
srm.customs_value(_convert_curr_iso_fdx(commodity_currency.name), total_commodities_amount, "NON_DOCUMENTS")
|
||||||
srm.duties_payment(shipper_warehouse.partner_id, acc_number, superself.fedex_duty_payment)
|
srm.duties_payment(shipper_warehouse, acc_number, superself.fedex_duty_payment)
|
||||||
send_etd = superself.env['ir.config_parameter'].get_param("delivery_fedex.send_etd")
|
send_etd = superself.env['ir.config_parameter'].get_param("delivery_fedex.send_etd")
|
||||||
srm.commercial_invoice(self.fedex_document_stock_type, send_etd)
|
srm.commercial_invoice(self.fedex_document_stock_type, send_etd)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user