mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[FIX] stock_picking_report_valued: Display all picking types reports correcty
This commit is contained in:
@@ -15,3 +15,7 @@
|
||||
* `GreenIce <https://www.greenice.com>`_:
|
||||
|
||||
* Fernando La Chica <fernandolachica@gmail.com>
|
||||
|
||||
* `Landoo <https://www.landoo.es>`_:
|
||||
|
||||
* Aritz Olea <ao@landoo.es>
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
<odoo>
|
||||
|
||||
<template id="valued_report_picking" inherit_id="stock.report_delivery_document">
|
||||
<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="o.move_line_ids and o.state=='done'"]/thead/tr"
|
||||
position="inside"
|
||||
>
|
||||
<t t-if="o.valued and o.sale_id and o.move_line_ids">
|
||||
<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-right"><strong>Qty Reserved</strong></th>
|
||||
</t>
|
||||
@@ -21,7 +24,7 @@
|
||||
<xpath expr="//th[@name='th_sml_qty_ordered']" position="attributes">
|
||||
<attribute
|
||||
name="t-if"
|
||||
add="and not (o.valued or o.sale_id or o.move_line_ids)"
|
||||
add="and (not is_outgoing or not (o.valued and o.sale_id and o.move_line_ids))"
|
||||
separator=" "
|
||||
/>
|
||||
</xpath>
|
||||
@@ -31,7 +34,7 @@
|
||||
>
|
||||
<attribute
|
||||
name="t-if"
|
||||
add="or (o.valued and o.sale_id and o.move_line_ids)"
|
||||
add="or (o.valued and o.sale_id and o.move_line_ids and is_outgoing)"
|
||||
separator=" "
|
||||
/>
|
||||
</xpath>
|
||||
@@ -41,7 +44,7 @@
|
||||
>
|
||||
<attribute
|
||||
name="t-if"
|
||||
add="or (o.valued and o.sale_id and o.move_line_ids)"
|
||||
add="or (o.valued and o.sale_id and o.move_line_ids and is_outgoing)"
|
||||
separator=" "
|
||||
/>
|
||||
</xpath>
|
||||
@@ -51,7 +54,7 @@
|
||||
>
|
||||
<attribute
|
||||
name="t-if"
|
||||
add="or (o.valued and o.sale_id and o.move_line_ids)"
|
||||
add="or (o.valued and o.sale_id and o.move_line_ids and is_outgoing)"
|
||||
separator=" "
|
||||
/>
|
||||
</xpath>
|
||||
@@ -59,7 +62,7 @@
|
||||
expr="//table[@t-if="o.move_line_ids and o.state=='done'"]"
|
||||
position="after"
|
||||
>
|
||||
<t t-if="o.valued and o.sale_id and o.move_line_ids">
|
||||
<t t-if="o.valued and o.sale_id and o.move_line_ids and is_outgoing">
|
||||
<table class="table table-sm mt32">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -91,8 +94,7 @@
|
||||
inherit_id="stock.stock_report_delivery_has_serial_move_line"
|
||||
>
|
||||
<xpath expr="//td[@name='move_line_lot_qty_done']" position="after">
|
||||
<t t-if="o.valued and o.sale_id and o.move_line_ids">
|
||||
<t t-if="move_line.picking_id.state != 'done'">
|
||||
<t t-if="move_line.picking_id.state != 'done'">
|
||||
<td class="text-right">
|
||||
<span t-field="move_line.product_uom_qty" />
|
||||
<span t-field="move_line.product_uom_id" /></td>
|
||||
@@ -102,6 +104,7 @@
|
||||
<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">
|
||||
<td class="text-right"><span t-field="move_line.sale_price_unit" /></td>
|
||||
<td class="text-right" groups="product.group_discount_per_so_line">
|
||||
<span t-field="move_line.sale_discount" />
|
||||
@@ -117,7 +120,7 @@
|
||||
<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)"
|
||||
add="not (o.valued or o.sale_id or o.move_line_ids or is_outgoing)"
|
||||
separator=" "
|
||||
/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user