Skip to content
Snippets Groups Projects
Commit 87bd8a91 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#133676

X-original-commit: 9bdb0ed2
Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
Signed-off-by: default avatarSéna Serge Nshimiyimana (sesn) <sesn@odoo.com>
parent 2d9f0f2e
Branches
Tags
No related merge requests found
......@@ -120,7 +120,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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment