Bill duties and charges to the customs agent for UPS shipment charges

Closes #14876
(grafted from e04bd7218a1bd78bc27439c7995ba5decbb48415)

--HG--
branch : 8.0
This commit is contained in:
Cédric Krier
2026-06-03 16:01:25 +02:00
parent 8e82e83f86
commit d413651001
+5 -1
View File
@@ -421,11 +421,15 @@ class CreateShippingUPS_Customs_Incoterm(metaclass=PoolMeta):
if (shipment.customs_international
and shipment.incoterm
and shipment.incoterm.import_duties == 'seller'):
if customs_agent := shipment.customs_agent:
account_number = customs_agent.ups_account_number
else:
account_number = credential.account_number
payment_information['ShipmentCharge'].append({
# Type 02 is for Duties and Taxes
'Type': '02',
'BillShipper': {
'AccountNumber': credential.account_number,
'AccountNumber': account_number,
},
})
return payment_information