[FIX] l10n_it_stock_ddt: discount in ddt reports
Issue: Discounts are not displayed in DDT Steps to reproduce: - create a quotation with a sale line having a discount - smart button delivery > set qty > validate - Print opw-3745866 closes odoo/odoo#162287 X-original-commit: 957443d8a0f416997de9c99354c9d3ae2fb3dfbf Signed-off-by: Josse Colpaert <jco@odoo.com> Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
This commit is contained in:
@@ -100,10 +100,14 @@
|
||||
<div class="mt64"/>
|
||||
|
||||
<table class="table table-sm" name="document_details">
|
||||
<t t-set="display_discount" t-value="any(m.sale_line_id.discount for m in o.move_ids)"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
<th><strong>Quantity</strong></th>
|
||||
<t t-if="display_discount">
|
||||
<th><strong>Disc.%</strong></th>
|
||||
</t>
|
||||
<th><strong>Total Value</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -119,9 +123,12 @@
|
||||
<span t-field="move.quantity"/>
|
||||
<span t-field="move.product_uom" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td t-if="display_discount">
|
||||
<span t-field="move.sale_line_id.discount"/>
|
||||
</td>
|
||||
<td>
|
||||
<t t-if="move.sale_line_id">
|
||||
<t t-set="lst_price" t-value="move.sale_line_id.price_unit * move.quantity"/>
|
||||
<t t-set="lst_price" t-value="move.sale_line_id.price_reduce_taxinc * move.quantity"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="lst_price" t-value="move.product_id.lst_price * move.product_uom._compute_quantity(move.quantity, move.product_id.uom_id)"/>
|
||||
@@ -133,6 +140,8 @@
|
||||
</t>
|
||||
</t>
|
||||
<tr>
|
||||
<td t-if="display_discount">
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
|
||||
Reference in New Issue
Block a user