diff --git a/addons/l10n_it_stock_ddt/report/l10n_it_ddt_report.xml b/addons/l10n_it_stock_ddt/report/l10n_it_ddt_report.xml index 3cbba6d047c26f73061caabeaa537d332c9fb844..ea22b4f0e161d46186e310d1270d09e20eb1d249 100644 --- a/addons/l10n_it_stock_ddt/report/l10n_it_ddt_report.xml +++ b/addons/l10n_it_stock_ddt/report/l10n_it_ddt_report.xml @@ -124,7 +124,12 @@ <span t-field="move.product_uom" groups="uom.group_uom"/> </td> <td> - <t t-set="lst_price" t-value="move.product_id.lst_price * move.quantity_done"/> + <t t-if="move.sale_line_id"> + <t t-set="lst_price" t-value="move.sale_line_id.price_unit * move.quantity_done"/> + </t> + <t t-else=""> + <t t-set="lst_price" t-value="move.product_id.lst_price * move.product_uom._compute_quantity(move.quantity_done, move.product_id.uom_id)"/> + </t> <span t-esc="lst_price" t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'/> <t t-set="total_value" t-value="total_value + lst_price"/> </td>