Refactor code structure for improved readability and maintainability

This commit is contained in:
Alaguraj0361 2026-06-12 20:41:14 +05:30
parent c60f36f7c1
commit 36071c22ce
3 changed files with 1249 additions and 184 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -17,7 +17,7 @@
<tbody>
<tr t-foreach="requests" t-as="req">
<td>
<a t-att-href="'/my/rentals/%s' % req.id" t-out="req.name" class="font-weight-bold" style="color: #714B67;"/>
<a t-att-href="'/my/rentals/%s' % req.id" t-out="req.name" class="font-weight-bold" style="color: #0b223e;"/>
</td>
<td><span t-field="req.event_date"/></td>
<td><span t-field="req.event_type"/></td>
@ -50,7 +50,7 @@
<div class="col-lg-8 mb-4">
<div class="card border-0 shadow-sm p-4" style="border-radius: 12px; background: white;">
<div class="d-flex justify-content-between align-items-center mb-4 pb-3 border-bottom">
<h3 class="font-weight-bold mb-0" style="color: #714B67;">
<h3 class="font-weight-bold mb-0" style="color: #0b223e;">
Request <t t-out="rental_request.name"/>
</h3>
<span class="h5 mb-0">
@ -90,7 +90,7 @@
</div>
<!-- Products lines -->
<h5 class="font-weight-bold mb-3 mt-4" style="color: #714B67;">Requested Products</h5>
<h5 class="font-weight-bold mb-3 mt-4" style="color: #0b223e;">Requested Products</h5>
<div class="table-responsive">
<table class="table mb-0" style="font-size: 0.9rem;">
<thead class="bg-light">
@ -122,7 +122,7 @@
<div class="col-lg-4">
<!-- Pricing Card -->
<div class="card border-0 shadow-sm p-4 mb-4" style="border-radius: 12px; background: white;">
<h5 class="font-weight-bold mb-3" style="color: #714B67;">Billing Details</h5>
<h5 class="font-weight-bold mb-3" style="color: #0b223e;">Billing Details</h5>
<div class="d-flex justify-content-between mb-2" style="font-size: 0.9rem;">
<span class="text-muted">Rental Total:</span>
<span>
@ -140,12 +140,12 @@
<hr class="my-2"/>
<div class="d-flex justify-content-between mb-3">
<strong>Grand Total:</strong>
<strong class="h5 font-weight-bold mb-0" style="color: #714B67;">
<strong class="h5 font-weight-bold mb-0" style="color: #0b223e;">
<span t-field="rental_request.amount_total" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</strong>
</div>
<div t-if="rental_request.sale_order_id" class="pt-2">
<a t-att-href="rental_request.sale_order_id.get_portal_url()" class="btn btn-outline-primary btn-block py-2 font-weight-bold" style="border-radius: 30px; border-color: #714B67; color: #714B67; font-size: 0.85rem;">
<a t-att-href="rental_request.sale_order_id.get_portal_url()" class="btn btn-outline-primary btn-block py-2 font-weight-bold" style="border-radius: 30px; border-color: #0b223e; color: #0b223e; font-size: 0.85rem;">
View Original Sales Quotation
</a>
</div>
@ -153,7 +153,7 @@
<!-- Documents status -->
<div class="card border-0 shadow-sm p-4 mb-4" style="border-radius: 12px; background: white;">
<h5 class="font-weight-bold mb-3" style="color: #714B67;">Document Status</h5>
<h5 class="font-weight-bold mb-3" style="color: #0b223e;">Document Status</h5>
<t t-foreach="rental_request.document_ids" t-as="doc">
<div class="d-flex align-items-center justify-content-between p-2 mb-2 bg-light" style="border-radius: 8px; font-size: 0.85rem;">
<div>
@ -170,7 +170,7 @@
<!-- Delivery logistics -->
<div class="card border-0 shadow-sm p-4" style="border-radius: 12px; background: white;" t-if="rental_request.status in ('confirmed', 'delivered', 'returned', 'completed')">
<h5 class="font-weight-bold mb-3" style="color: #714B67;">Logistics Tracking</h5>
<h5 class="font-weight-bold mb-3" style="color: #0b223e;">Logistics Tracking</h5>
<div style="font-size: 0.9rem;">
<p class="mb-2"><strong>Delivery:</strong>
<span t-if="rental_request.delivery_status == 'pending'" class="badge badge-warning">Pending Delivery</span>

File diff suppressed because it is too large Load Diff