Skip to content
Snippets Groups Projects
Commit 9bdb0ed2 authored by Nshimiyimana Séna's avatar Nshimiyimana Séna
Browse files

[FIX] l10n_it_stock_ddt: account for pricelist in the DDT report


Bug:
When printing DDT documents for a delivery with a pricelist applied, the
total value shown comes from the product's original price and not the
modified pricelist price.

Setup:
- install `sale_management` and `l10n_it_stock_ddt`
- have a product P with a price A
- create a pricelist that where P has a price B

Steps to reproduce:
- activate DDT report printing
- create a quotation set the pricelist you created and the product P
- validate the quotation
- go to the associated delivery and validate it
- print the DDT report

You should see that the price mentioned on the DDT report does not
account for the pricelist. (price A is shown, instead of B)

opw-3171295

closes odoo/odoo#121424

Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
parent 73512e95
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,12 @@ ...@@ -124,7 +124,12 @@
<span t-field="move.product_uom" groups="uom.group_uom"/> <span t-field="move.product_uom" groups="uom.group_uom"/>
</td> </td>
<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}'/> <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"/> <t t-set="total_value" t-value="total_value + lst_price"/>
</td> </td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment