Hi Andreas,
We did something similar but not applied in idempiere. If you are interested we did the following.
Created a "Shipment Plan" which had multiple lines to pre-calculate each type of cost that would be incurred in shipping/delivering from the source country/warehouse to our country/warehouse (typically 5 to 10 separate items of cost). Each cost could be allocated on a different allocation method such as weight, volume,volumetric weight, cost per unit, percentage of product cost, marine insurance costs etc,
Import Duty tables were added and applied automatically in a PO which included an m_product subject to duty.
A PO would have a Shipment Plan selected on the PO top tab. When 'prepared' it would calculate each of the expected costs of receiving the product(s) on the PO based on duty and weight/volume stored in the m_product..
Later a Material Receipt would be created which would automatically create a C_Activity which we had renamed as 'Import Activity' and add it to the MR.
The posting of the MR would debit product cost, credit 'goods received not invoiced', credit (one or multiple) 'accrued landing costs' account(s) ... the landing costs would be calculated based on evaluating all the lines in the Shipment Plan. The 'Product Cost' would be created to include all the landed cost items (as were using batch level costing).
As actual landing cost invoices were received the invoices would be posted to the accrued landing costs accounts and linked to the MR's Import Activity.
When all costs were known to be posted, a report could be run for the selected 'Import Activity' and the output of the report would automatically create a journal entry and move the difference between the pre-estimated landing costs in the MR and the actual landing cost invoices to Invoice Price Variance.
The system was used to import motor vehicles and motor vehicle parts. About 50% of parts were ordered for immediate delivery by airfreight. As soon as the parts arrived they would be cross-docked and shipped out to fix broken cars. The customer wanted the landed costs taken up when the MR was posted so that the immediate sale of the parts could be costed to COGS with a good approximation of the landed cost rather than trying to get all the landed cost invoices posted before the Customer Shipment could happen.
If the above is of any interest to you I can provide some user documentation which describes the process more clearly. The code is gplv2 if of any use.
regards
Steven