Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
205 Vistas

Hi. I have an order of three lines. Each line has UOM units with packaging (containers ) each container contains different number of units. I am trying to add shipping cost as landed cost , i get an issue with the calculation (not an error) it is a business case). I would like to explain the shipping cost: Line 1 of the PO has two containers , the second line has 3 containers and the third line has one container , each container cost 2,000 USD. Now how can I compute the landed cost for each line of the the receipts of the three line where each has different number of units ? The expected calculation is the following:

1- Line 1 (6000  USD/number of units of the related goods receipt of line 1)

2- Line (4000 USD /number of units of the related goods receipt of line 2)

3-  Line (2000 USD /number of units of the related goods receipt of line 3)

The computation landed cost of each unit in each line is not right.

I got a solution of receive each individual line  separately and add create a separate landing cost for each line. This solution will not be feasible because it requires a lot of work if you have a lot of orders and each has several lines of different number have to be treated separately.


I would be grateful, if any one has suggestion?




Avatar
Descartar
Mejor respuesta

Hi,


In Odoo, landed costs are normally distributed by methods such as quantity, cost, weight, or volume. This works when shipping costs are proportional to these factors, but in your case, the shipping charge is tied to containers per line, not units. That’s why Odoo’s default allocation does not reflect your real cost structure.


Your requirement is to split the shipping cost by container count: for example, Line 1 with 2 containers should get 6,000 USD, Line 2 with 2 containers gets 4,000 USD, and Line 3 with 1 container gets 2,000 USD. Each share is then divided by the units in that line to compute a per-unit cost. This ensures the calculation reflects actual container-based expenses instead of spreading costs across all units.


There are three possible approaches. First, create a custom landed cost allocation method in Odoo that distributes costs based on containers; this is the most scalable and accurate solution. Second, treat the container as the unit of measure, then use the “By Quantity” method to allocate costs, though this requires dual UoM for per-unit visibility. Third, manually create multiple landed cost records split by container share per line, but this is impractical for large volumes.


The recommended approach is adding a custom “By Container” landed cost method, which integrates smoothly with Odoo’s workflow and avoids heavy manual work while respecting your business logic.


Hope it helps

Avatar
Descartar