Skip to content
18 changes: 18 additions & 0 deletions rma/static/src/img/rma_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 29 additions & 8 deletions rma/views/rma_portal_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
>
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
<t t-call="portal.portal_docs_entry">
<t t-set="icon" t-value="'/rma/static/src/img/rma_icon.svg'" />
<t t-set="title">RMA Orders</t>
<t t-set="text" t-value="'Manage your RMA Orders'" />
<t t-set="url" t-value="'/my/rmas'" />
<t t-set="placeholder_count" t-value="'rma_count'" />
</t>
Expand All @@ -44,35 +46,46 @@
<t t-if="rmas" t-call="portal.portal_table">
<thead>
<tr class="active">
<th>RMA #</th>
<th class='d-none d-md-table-cell'>Date</th>
<th name="th_name">RMA #</th>
<th name="th_date" class='d-none d-md-table-cell'>Date</th>
<th name="th_origin">Origin</th>
<th name="th_product">Product</th>
<th class='text-right'>Quantity</th>
<th class='d-none d-md-table-cell'>Status</th>
<th name="th_product_uom_qty" class='text-right'>Quantity</th>
<th name="th_operation_id">Requested operation</th>
<th name="th_state" class='d-none d-md-table-cell'>Status</th>
</tr>
</thead>
<tbody>
<t t-foreach="rmas" t-as="rma">
<tr>
<td>
<td name="td_name">
<a
t-att-href="rma.get_portal_url()"
t-att-title="rma.name"
>
<t t-esc="rma.name" />
</a>
</td>
<td class="d-none d-md-table-cell">
<td name="td_date" class="d-none d-md-table-cell">
<span t-field="rma.date" />
</td>
<td name="td_origin">
<span t-field="rma.origin" />
</td>
<!-- Portal users don't have access to unpublished products -->
<td name="td_product">
<span t-esc="rma.sudo().product_id.display_name" />
</td>
<td class='text-right'>
<td name="td_product_uom_qty" class='text-right'>
<span t-field="rma.product_uom_qty" />
</td>
<td class="d-none d-md-table-cell tx_status">
<td name="td_operation_id">
<span t-field="rma.operation_id" />
</td>
<td
name="td_state"
class="d-none d-md-table-cell tx_status"
>
<span class="badge rounded-pill text-bg-info">
<span t-field="rma.state" />
</span>
Expand Down Expand Up @@ -286,6 +299,14 @@
<span t-field="rma.origin" />
</div>
</div>
<div t-if="rma.operation_id" class="row mb-2 mb-sm-1">
<div class="col-12 col-sm-4">
<strong>Requested operation</strong>
</div>
<div class="col-12 col-sm-8">
<span t-field="rma.operation_id" />
</div>
</div>
</div>
</div>
</div>
Expand Down
24 changes: 24 additions & 0 deletions rma_lot/views/rma_portal_template.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<odoo>
<template id="portal_my_rmas_lot" inherit_id="rma.portal_my_rmas">
<th name="th_product" position="after">
<th name="th_lot_id">
<t
t-if="rmas and all(rma.product_id.tracking=='serial' for rma in rmas)"
>
Serial Number
</t>
<t
t-elif="rmas and all(rma.product_id.tracking=='lot' for rma in rmas)"
>
Lot
</t>
<t t-else="">
Lot/Serial Number
</t>
</th>
</th>
<td name="td_product" position="after">
<td name="td_lot_id">
<span t-field="rma.lot_id" />
</td>
</td>
</template>
<template id="portal_rma_page_lot" inherit_id="rma.portal_rma_page">
<xpath expr="//div[@t-if='rma.product_uom_qty']" position="before">
<div t-if="rma.lot_id" class="row mb-2 mb-sm-1">
Expand Down
11 changes: 11 additions & 0 deletions rma_reason/views/rma_portal_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="portal_my_rmas_reason" inherit_id="rma.portal_my_rmas">
<th name="th_operation_id" position="before">
<th name="th_reason_id">Reason</th>
</th>
<td name="td_operation_id" position="before">
<td name="td_reason_id">
<span t-field="rma.reason_id" />
</td>
</td>
</template>

<template id="portal_rma_page" name="My RMA" inherit_id="rma.portal_rma_page">
<xpath expr="//div[@id='product_information']" position="inside">
<div class="col-12 col-md-6 mb-4 mb-md-0">
Expand Down
32 changes: 21 additions & 11 deletions rma_sale/views/sale_portal_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,24 +266,34 @@
</span>
</xpath>
</template>
<template id="portal_my_rmas_sale" inherit_id="rma.portal_my_rmas">
<span t-field="rma.origin" position="before">
<t t-if="rma.order_id">
<a
t-att-href="rma.order_id.get_portal_url()"
t-att-title="rma.order_id.name"
>
<span t-field="rma.order_id" />
</a>
</t>
</span>
<span t-field="rma.origin" position="attributes">
<attribute name="t-else">""</attribute>
</span>
</template>
<template id="portal_rma_page" name="Show RMAs" inherit_id="rma.portal_rma_page">
<xpath expr="//div[@t-if='rma.picking_id']" position="before">
<div t-if="rma.order_id" class="row mb-2 mb-sm-1">
<div class="col-12 col-sm-4">
<strong>Sale order</strong>
</div>
<div class="col-12 col-sm-8">
<span t-field="rma.order_id" />
</div>
</div>
</xpath>
<xpath expr="//div[@t-if='rma.origin']" position="after">
<div t-if="rma.operation_id" class="row mb-2 mb-sm-1">
<div class="col-12 col-sm-4">
<strong>Requested operation</strong>
</div>
<div class="col-12 col-sm-8">
<span t-field="rma.operation_id" />
<a
t-att-href="rma.order_id.get_portal_url()"
t-att-title="rma.order_id.name"
>
<span t-field="rma.order_id" />
</a>
</div>
</div>
</xpath>
Expand Down
Loading