[IMP] rma: improve rma report layout

This commit is contained in:
sbejaoui
2025-01-08 18:58:51 +01:00
parent 8f9755a57f
commit ac3ee09381
3 changed files with 38 additions and 37 deletions

View File

@@ -95,31 +95,36 @@
</p> </p>
</div> </div>
</div> </div>
<div class="row mt32 mb32" id="product_information"> <table class="table table-sm o_main_table table-borderless mt-4">
<div t-if="doc.picking_id" class="col-auto mw-100 mb-2"> <tbody>
<strong>Origin delivery:</strong> <tr t-if="doc.picking_id" name="tr_picking">
<p class="m-0" t-field="doc.picking_id" /> <td>Origin delivery</td>
</div> <td><span t-field="doc.picking_id" /></td>
<div t-if="doc.move_id" class="col-auto mw-100 mb-2"> </tr>
<strong>Move:</strong> <tr>
<p class="m-0" t-field="doc.move_id" /> <td>Product</td>
</div> <td><span t-field="doc.product_id" /></td>
<div t-if="doc.product_id" class="col-auto mw-100 mb-2"> </tr>
<strong>Product:</strong> <tr>
<p class="m-0" t-field="doc.product_id" /> <td>Quantity</td>
</div> <td>
<div t-if="doc.product_id" class="col-auto mw-100 mb-2"> <span t-field="doc.product_uom_qty" />
<strong>Quantity:</strong> <span t-field="doc.product_uom" groups="uom.group_uom" />
<p class="m-0"> </td>
<span t-field="doc.product_uom_qty" /> </tr>
<span t-field="doc.product_uom" groups="uom.group_uom" /> <tr t-if="doc.delivered_qty">
</p> <td>Delivered Quantity</td>
</div> <td>
<div t-if="doc.delivered_qty" class="col-auto mw-100 mb-2"> <span t-field="doc.delivered_qty" />
<strong>Delivered qty:</strong> <span t-field="doc.product_uom" groups="uom.group_uom" />
<p class="m-0" t-field="doc.delivered_qty" /> </td>
</div> </tr>
</div> <tr>
<td>Requested operation</td>
<td><span t-field="doc.operation_id" /></td>
</tr>
</tbody>
</table>
<div t-if="doc.description"> <div t-if="doc.description">
<strong>RMA Note:</strong> <strong>RMA Note:</strong>
<p t-out="doc.description" /> <p t-out="doc.description" />

View File

@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<odoo> <odoo>
<template id="report_rma_document" inherit_id="rma.report_rma_document"> <template id="report_rma_document" inherit_id="rma.report_rma_document">
<xpath expr="//div[@t-if='doc.picking_id']" position="before"> <xpath expr="//tr[@name='tr_picking']" position="before">
<div t-if="doc.order_id" class="col-auto mw-100 mb-2"> <tr t-if="doc.order_id" name="tr_picking">
<strong>Sale order:</strong> <td>Sale order</td>
<p class="m-0" t-field="doc.order_id" /> <td>
</div> <span t-field="doc.order_id" />
</xpath> </td>
<xpath expr="//div[@t-if='doc.user_id']" position="before"> </tr>
<div t-if="doc.operation_id" class="col-auto mw-100 mb-2">
<strong>Requested operation:</strong>
<p class="m-0" t-field="doc.operation_id" />
</div>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<odoo> <odoo>
<template id="report_rma_document" inherit_id="rma_sale.report_rma_document"> <template id="report_rma_document" inherit_id="rma_sale.report_rma_document">
<xpath expr="//div[@id='product_information']" position="after"> <xpath expr="//table" position="after">
<t t-if="doc.sudo().phantom_bom_product"> <t t-if="doc.sudo().phantom_bom_product">
<strong class="d-block mt32 mb-1">Kit information</strong> <strong class="d-block mt32 mb-1">Kit information</strong>
<div class="row mb32" id="kit_information"> <div class="row mb32" id="kit_information">