Files
stock-rma/rma/report/report_deliveryslip.xml

58 lines
1.9 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="report_delivery_document" inherit_id="stock.report_delivery_document">
<xpath
expr="//table[@name='stock_move_table']//th[@name='th_sm_quantity']"
position="before"
>
<t
t-set="has_rma"
t-value="bool(o.move_lines.filtered(lambda m: m.rma_line_id))"
/>
<th t-if="has_rma" name="th_sm_rma_line"><strong>RMA</strong></th>
</xpath>
<xpath expr="//table[@name='stock_move_table']/tbody//td[2]" position="before">
<td t-if="has_rma">
<span t-field="move.rma_line_id" />
</td>
</xpath>
<xpath
expr="//table[@name='stock_move_line_table']//th[@name='th_sml_quantity']"
position="before"
>
<t
t-set="sml_has_rma"
t-value="bool(o.move_line_ids.filtered(lambda m: m.move_id.rma_line_id))"
/>
<th t-if="sml_has_rma" name="th_sml_rma_line"><strong>RMA</strong></th>
</xpath>
</template>
<template
id="stock_report_delivery_has_serial_move_line"
inherit_id="stock.stock_report_delivery_has_serial_move_line"
>
<xpath expr="//td[@name='move_line_lot_qty_done']" position="before">
<td t-if="sml_has_rma">
<span t-field="move_line.move_id.rma_line_id" />
</td>
</xpath>
</template>
<template
id="stock_report_delivery_aggregated_move_lines"
inherit_id="stock.stock_report_delivery_aggregated_move_lines"
>
<xpath expr="//td[@name='move_line_aggregated_qty_done']" position="before">
<td t-if="sml_has_rma">
<!-- TODO: To be implemented.
It will require de extension _get_aggregated_product_quantities
-->
</td>
</xpath>
</template>
</odoo>