Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] rma: improve rma report layout #440

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 30 additions & 25 deletions rma/views/report_rma.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,31 +95,36 @@
</p>
</div>
</div>
<div class="row mt32 mb32" id="product_information">
<div t-if="doc.picking_id" class="col-auto mw-100 mb-2">
<strong>Origin delivery:</strong>
<p class="m-0" t-field="doc.picking_id" />
</div>
<div t-if="doc.move_id" class="col-auto mw-100 mb-2">
<strong>Move:</strong>
<p class="m-0" t-field="doc.move_id" />
</div>
<div t-if="doc.product_id" class="col-auto mw-100 mb-2">
<strong>Product:</strong>
<p class="m-0" t-field="doc.product_id" />
</div>
<div t-if="doc.product_id" class="col-auto mw-100 mb-2">
<strong>Quantity:</strong>
<p class="m-0">
<span t-field="doc.product_uom_qty" />
<span t-field="doc.product_uom" groups="uom.group_uom" />
</p>
</div>
<div t-if="doc.delivered_qty" class="col-auto mw-100 mb-2">
<strong>Delivered qty:</strong>
<p class="m-0" t-field="doc.delivered_qty" />
</div>
</div>
<table class="table table-sm o_main_table table-borderless mt-4">
<tbody>
<tr t-if="doc.picking_id" name="tr_picking">
<td>Origin delivery</td>
<td><span t-field="doc.picking_id" /></td>
</tr>
<tr>
<td>Product</td>
<td><span t-field="doc.product_id" /></td>
</tr>
<tr>
<td>Quantity</td>
<td>
<span t-field="doc.product_uom_qty" />
<span t-field="doc.product_uom" groups="uom.group_uom" />
</td>
</tr>
<tr t-if="doc.delivered_qty">
<td>Delivered Quantity</td>
<td>
<span t-field="doc.delivered_qty" />
<span t-field="doc.product_uom" groups="uom.group_uom" />
</td>
</tr>
<tr>
<td>Requested operation</td>
<td><span t-field="doc.operation_id" /></td>
</tr>
</tbody>
</table>
<div t-if="doc.description">
<strong>RMA Note:</strong>
<p t-out="doc.description" />
Expand Down
18 changes: 7 additions & 11 deletions rma_sale/views/report_rma.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_rma_document" inherit_id="rma.report_rma_document">
<xpath expr="//div[@t-if='doc.picking_id']" position="before">
<div t-if="doc.order_id" class="col-auto mw-100 mb-2">
<strong>Sale order:</strong>
<p class="m-0" t-field="doc.order_id" />
</div>
</xpath>
<xpath expr="//div[@t-if='doc.user_id']" position="before">
<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 expr="//tr[@name='tr_picking']" position="before">
<tr t-if="doc.order_id" name="tr_picking">
<td>Sale order</td>
<td>
<span t-field="doc.order_id" />
</td>
</tr>
</xpath>
</template>
</odoo>
2 changes: 1 addition & 1 deletion rma_sale_mrp/views/report_rma.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<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">
<strong class="d-block mt32 mb-1">Kit information</strong>
<div class="row mb32" id="kit_information">
Expand Down
Loading