When real cost invoice policy is active in a delivery carrier, the delivery price is set after validating the delivery. When there is margin, the estimated price is calculated with margin but when the delivery is validated, the price set in the delivery line does not include the margin. This commit fixes this behavior by setting the price of the delivery line with appropriate margin. closes odoo/odoo#37178 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>