From 2c2d157bc0da82cf846197aae5db1fd6dcba9690 Mon Sep 17 00:00:00 2001 From: Cedric Collins Date: Mon, 29 Nov 2021 11:20:23 -0600 Subject: [PATCH 1/2] [FIX] delivery_fedex_hibou: shipper_warehouse has no attribute `partner_id` H9214 --- delivery_fedex_hibou/models/delivery_fedex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/delivery_fedex_hibou/models/delivery_fedex.py b/delivery_fedex_hibou/models/delivery_fedex.py index 56dbe496..494888ee 100644 --- a/delivery_fedex_hibou/models/delivery_fedex.py +++ b/delivery_fedex_hibou/models/delivery_fedex.py @@ -282,7 +282,7 @@ class DeliveryFedex(models.Model): 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.duties_payment(shipper_warehouse.partner_id.country_id.code, acc_number) + srm.duties_payment(shipper_warehouse.country_id.code, acc_number) package_count = len(picking.package_ids) or 1 From 8d8916082ed6a9ebfd5d490be1e48495986fa7cd Mon Sep 17 00:00:00 2001 From: Cedric Collins Date: Mon, 29 Nov 2021 12:11:54 -0600 Subject: [PATCH 2/2] [FIX] delivery_fedex_hibou: get price per variant H9214 --- delivery_fedex_hibou/models/delivery_fedex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/delivery_fedex_hibou/models/delivery_fedex.py b/delivery_fedex_hibou/models/delivery_fedex.py index 494888ee..b288e243 100644 --- a/delivery_fedex_hibou/models/delivery_fedex.py +++ b/delivery_fedex_hibou/models/delivery_fedex.py @@ -267,7 +267,7 @@ class DeliveryFedex(models.Model): commodity_country_of_manufacture = picking.picking_type_id.warehouse_id.partner_id.country_id.code for operation in picking.move_line_ids: - commodity_amount = operation.move_id.sale_line_id.price_unit or operation.product_id.list_price + commodity_amount = operation.move_id.sale_line_id.price_unit or operation.product_id.lst_price total_commodities_amount += (commodity_amount * operation.qty_done) commodity_description = operation.product_id.name commodity_number_of_piece = '1'