Skip to content

Commit

Permalink
[FIX] stock_picking_report_valued: Use original qty done column from …
Browse files Browse the repository at this point in the history
…Odoo

I don't understand why it is necessary to hide the original qty done column. This makes other modules that modify the qty done column not work.

@moduon MT-5825
  • Loading branch information
EmilioPascual committed Apr 19, 2024
1 parent 469d732 commit 68c12ae
Showing 1 changed file with 7 additions and 31 deletions.
38 changes: 7 additions & 31 deletions stock_picking_report_valued/report/stock_picking_report_valued.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
<xpath expr="//div[hasclass('page')]" position="before">
<t t-set="is_outgoing" t-value="o.picking_type_code == 'outgoing'" />
</xpath>
<xpath
expr="//table[@t-if=&quot;o.move_line_ids and o.state==&apos;done&apos;&quot;]/thead/tr"
position="inside"
>
<xpath expr="//table[@name='stock_move_line_table']/thead/tr" position="inside">
<t t-if="o.valued and o.sale_id and o.move_line_ids and is_outgoing">
<t t-if="o.state != 'done'">
<th class="text-end"><strong>Qty Reserved</strong></th>
</t>
<th class="text-end"><strong>Unit Price</strong></th>
<th class="text-end" groups="product.group_discount_per_so_line">
<strong>Discount</strong>
Expand Down Expand Up @@ -94,36 +88,18 @@
inherit_id="stock.stock_report_delivery_has_serial_move_line"
>
<xpath expr="//td[@name='move_line_lot_qty_done']" position="after">
<t t-if="move_line.picking_id.state != 'done'">
<td class="text-end">
<span t-field="move_line.product_uom_qty" />
<span t-field="move_line.product_uom_id" /></td>
</t>
<t t-elif="move_line.picking_id.state == 'done'">
<td class="text-center">
<span t-field="move_line.qty_done" />
<span t-field="move_line.product_uom_id" /></td>
</t>
<t t-if="o.valued and o.sale_id and o.move_line_ids and is_outgoing">
<td class="text-end"><span t-field="move_line.sale_price_unit" /></td>
<td class="text-end">
<span t-field="move_line.sale_price_unit" /></td>
<td class="text-end" groups="product.group_discount_per_so_line">
<span t-field="move_line.sale_discount" />
</td>
<td class="text-end"><span
t-field="move_line.sale_price_subtotal"
/></td>
<td class="text-end"><span
t-field="move_line.sale_tax_description"
/></td>
<td class="text-end">
<span t-field="move_line.sale_price_subtotal" /></td>
<td class="text-end">
<span t-field="move_line.sale_tax_description" /></td>
</t>
</xpath>
<xpath expr="//td[@name='move_line_lot_qty_done']" position="attributes">
<attribute
name="t-if"
add="not (o.valued or o.sale_id or o.move_line_ids or is_outgoing)"
separator=" "
/>
</xpath>
</template>

</odoo>

0 comments on commit 68c12ae

Please sign in to comment.