You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
377 lines
20 KiB
377 lines
20 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<!-- Courier request portal home-->
|
|
<template id="website_courier_requests" name="my_courier_requests"
|
|
inherit_id="portal.portal_my_home"
|
|
customize_show="True"
|
|
priority="32">
|
|
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
|
|
<t t-call="portal.portal_docs_entry">
|
|
<t t-set="icon" t-value="'/account/static/src/img/Bill.svg'"/>
|
|
<t t-set="title">Courier Requests</t>
|
|
<t t-set="url" t-value="'/my/courier/requests'"/>
|
|
<t t-set="text">Check all the Courier Requests</t>
|
|
<t t-set="placeholder_count" t-value="'courier_requests_count'"/>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
<!--Courier Request tree -->
|
|
<template id="portal_my_courier_requests_tree">
|
|
<t t-call="portal.portal_layout">
|
|
<div class="groupby_courier">
|
|
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
|
<t t-call="portal.portal_searchbar">
|
|
<h8 style="margin-left: -825px;color: darkslategray;">/ My
|
|
Courier Requests
|
|
</h8>
|
|
</t>
|
|
<t t-call="courier_management.portal_my_certificates_search"/>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
<!--Courier Request search-->
|
|
<template id="portal_my_certificates_search">
|
|
<div id="search_courier_requests_group" class="search_courier_requests">
|
|
<t t-if="not courier_request">
|
|
<h5>There are currently no courier requests for your account.
|
|
</h5>
|
|
</t>
|
|
<t t-if="courier_request" t-call="portal.portal_table">
|
|
<thead>
|
|
<tr class="active">
|
|
<th>Events #</th>
|
|
<th class="text-right">Sender Name</th>
|
|
<th class="text-right">Receiver Name</th>
|
|
<th class="text-right">Registration Date</th>
|
|
<th class="text-right">Delivery Date</th>
|
|
<th class="text-right">Type</th>
|
|
<th class="text-right">L x W x H</th>
|
|
<th class="text-right">Category</th>
|
|
<th class="text-right">Priority</th>
|
|
</tr>
|
|
</thead>
|
|
<t t-foreach="courier_request" t-as="courier">
|
|
<tr>
|
|
<td id="my_selector">
|
|
<a class="my_courier_request_link"
|
|
t-attf-data-id="{{courier.id}}"
|
|
t-attf-href="/my/courier/requests/form/{{courier.id}}">
|
|
<t t-esc="courier.name"/>
|
|
</a>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="courier.sender_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="courier.receiver_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="courier.registration_date"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="courier.delivery_date"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="courier.type_id.courier_type"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="courier.l_w_h_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="courier.category_id.courier_category"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="courier.priority_id.name"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
</template>
|
|
<!-- Courier Request form template-->
|
|
<template id="portal_my_courier_requests_form"
|
|
name="Courier Request Form">
|
|
<t t-call="portal.portal_layout">
|
|
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
|
<t t-call="portal.portal_searchbar">
|
|
<a href="/my/courier/requests">
|
|
<h8 style="margin-left: -1231px;color: darkslategray;"
|
|
class="breadcrumb-item active">/ My Courier
|
|
Requests
|
|
</h8>
|
|
</a>
|
|
<h8 style="margin-left: -1064px;color: darkgray;">/ Courier
|
|
Requests
|
|
<t t-esc="record_courier_requests['name']"/>
|
|
</h8>
|
|
</t>
|
|
<!-- Slidebar-->
|
|
<div class="row mt16 o_portal_sale_sidebar">
|
|
<t t-call="portal.portal_record_sidebar">
|
|
<t t-set="classes" t-value="'col-lg-auto d-print-none'"/>
|
|
<t t-set="title">
|
|
<h4 class="mb-0">
|
|
<t t-esc="record_courier_requests['name']"/>
|
|
</h4>
|
|
</t>
|
|
<t t-set="entries">
|
|
<ul class="list-group list-group-flush flex-wrap flex-row flex-lg-column">
|
|
<li class="list-group-item d-grid align-content-start">
|
|
<div class="small mb-1">
|
|
<strong class="text-muted">Your Contact
|
|
</strong>
|
|
</div>
|
|
<div class="row flex-nowrap">
|
|
<div class="col flex-grow-0 pe-2">
|
|
<img class="rounded-circle mr4 float-start o_portal_contact_img"
|
|
t-att-src="image_data_uri(record_courier_requests['sender_id'].avatar_1024)"
|
|
alt="Contact" style="width: 150px"/>
|
|
</div>
|
|
<div class="col ps-0"
|
|
style="min-width: 150px">
|
|
<span t-esc="record_courier_requests['sender_id']"
|
|
t-options='{"widget": "contact", "fields": ["name", "phone"], "no_marker": True}'/>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</t>
|
|
</t>
|
|
<!-- Courier Request Number -->
|
|
<div id="courier_requests_call_page_details"
|
|
class="col-12 col-lg justify-content-end">
|
|
<div t-attf-class="card #{'pb-5' if report_type == 'html' else ''}"
|
|
id="cer_portal_doc_content">
|
|
<div class="card pb-5" style="padding: 1rem 1rem;">
|
|
<div class="container">
|
|
<h4 class="mb-0" style="margin-left:15px;">
|
|
<br/>
|
|
<b>
|
|
<t t-esc="record_courier_requests['name']"/>
|
|
<span t-if="record_courier_requests['state'] == 'dispatched'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:yellow;margin-left: 600px;">
|
|
Dispatched
|
|
</span>
|
|
<span t-if="record_courier_requests['state'] == 'in_transit'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:yellow;margin-left: 600px;">
|
|
In Transit
|
|
</span>
|
|
<span t-if="record_courier_requests['state'] == 'arrived_at_destination'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:yellow;margin-left: 508px;;">
|
|
Arrived At
|
|
Destination
|
|
</span>
|
|
<span t-if="record_courier_requests['state'] == 'out_for_delivery'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:yellow;margin-left: 568px;">
|
|
Out For Delivery
|
|
</span>
|
|
<span t-if="record_courier_requests['state'] == 'new'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:deepskyblue;margin-left: 600px;">
|
|
New
|
|
</span>
|
|
<span t-if="record_courier_requests['state'] == 'collected'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:green;margin-left: 600px;">
|
|
Collected
|
|
</span>
|
|
<span t-if="record_courier_requests['state'] == 'delivered'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:green;margin-left: 600px;">
|
|
Delivered
|
|
</span>
|
|
<span t-if="record_courier_requests['state'] == 'invoiced'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:green;margin-left: 600px;">
|
|
Invoiced
|
|
</span>
|
|
<span t-if="record_courier_requests['state'] == 'canceled'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:red;margin-left: 600px;">
|
|
Cancelled
|
|
</span>
|
|
</b>
|
|
</h4>
|
|
<hr style="width:100%"/>
|
|
</div>
|
|
<!-- Page Content-->
|
|
<table class="table-responsive">
|
|
<tr>
|
|
<th>Delivery Date</th>
|
|
<td>
|
|
<t t-esc="record_courier_requests['delivery_date']"/>
|
|
</td>
|
|
<th>Priority Amount
|
|
</th>
|
|
<td>
|
|
<t t-esc="record_courier_requests['priority_amount']"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Receiver Address</th>
|
|
<td>
|
|
<t t-esc="record_courier_requests['receiver_email']"/>
|
|
</td>
|
|
<th>Volumetric Weight Price
|
|
</th>
|
|
<td>
|
|
<t t-esc="record_courier_requests['volumetric_weight_price']"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
</th>
|
|
<td>
|
|
<t t-esc="record_courier_requests['receiver_mobile_number']"/>
|
|
</td>
|
|
<th>Distance Amount
|
|
</th>
|
|
<td>
|
|
<t t-esc="record_courier_requests['distance_amount']"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
</th>
|
|
<td>
|
|
<t t-esc="record_courier_requests['receiver_street']"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
</th>
|
|
<td>
|
|
<t t-esc="record_courier_requests['receiver_city']"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h5 style="color:inherit;margin-left: 10px;font-size: 1.75rem;">
|
|
Courier Details
|
|
</h5>
|
|
<table class="table table-sm o_main_table">
|
|
<thead>
|
|
<tr>
|
|
<th>Product</th>
|
|
<th>Quantity</th>
|
|
<th>Weight</th>
|
|
<th>Total Weight</th>
|
|
<th>Weight Price</th>
|
|
<th>Sub Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="record_courier_requests['courier_details_ids']"
|
|
t-as="courier_details">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="courier_details.product_id.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="courier_details.quantity"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="courier_details.weight"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="courier_details.total_weight"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="courier_details.weight_price"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="courier_details.sub_total"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
<div>
|
|
<div class="col-sm-7 col-md-6 ms-auto">
|
|
<table class="table table-sm">
|
|
<tr class="border-black o_total">
|
|
<th>Total</th>
|
|
<td class="text-end">
|
|
<t t-esc="record_courier_requests['total']"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
<!-- Certificate group by template-->
|
|
<template id="courier_requests_group_by_template">
|
|
<t t-if="not courier_request">
|
|
<h5>Choose An Group By option</h5>
|
|
</t>
|
|
<t t-if="courier_request" t-call="portal.portal_table">
|
|
<tbody>
|
|
<thead>
|
|
<tr class="active">
|
|
<th>Events #</th>
|
|
<th class="text-right">Sender Name</th>
|
|
<th class="text-right">Receiver Name</th>
|
|
<th class="text-right">Registration Date</th>
|
|
<th class="text-right">Delivery Date</th>
|
|
<th class="text-right">Type</th>
|
|
<th class="text-right">L x W x H</th>
|
|
<th class="text-right">Category</th>
|
|
<th class="text-right">Priority</th>
|
|
</tr>
|
|
</thead>
|
|
<t t-foreach="courier_request" t-as="courier">
|
|
<tr>
|
|
<th class="table-light" colspan="4">
|
|
<t t-esc="courier['name']"/>
|
|
</th>
|
|
</tr>
|
|
<t t-foreach="courier['data']" t-as="courier">
|
|
<t t-foreach="courier" t-as="data">
|
|
<tr>
|
|
<td>
|
|
<a href="#"
|
|
t-attf-href="/my/courier/requests/form/{{data.id}}">
|
|
<t t-esc="data.name"
|
|
t-value="data.id"/>
|
|
</a>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.sender_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.receiver_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.registration_date"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.delivery_date"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.type_id.courier_type"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.l_w_h_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.category_id.courier_category"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.priority_id.name"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</tbody>
|
|
</t>
|
|
</template>
|
|
</odoo>
|
|
|