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.
559 lines
29 KiB
559 lines
29 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<template id="replace_dashboard_portal_view">
|
|
<t t-call="portal.frontend_layout">
|
|
<!-- To set the count of data-->
|
|
<t t-set="count_quotation" t-value="0"/>
|
|
<t t-foreach="quotation_portal" t-as="q">
|
|
<t t-set="count_quotation" t-value="count_quotation+1"/>
|
|
</t>
|
|
<t t-set="count_task" t-value="0"/>
|
|
<t t-foreach="tasks_portal" t-as="t">
|
|
<t t-set="count_task" t-value="count_task+1"/>
|
|
</t>
|
|
<t t-set="count_lead" t-value="0"/>
|
|
<t t-foreach="leads_portal" t-as="l">
|
|
<t t-set="count_lead" t-value="count_lead+1"/>
|
|
</t>
|
|
<t t-set="count_opportunity" t-value="0"/>
|
|
<t t-foreach="opportunities_portal" t-as="o">
|
|
<t t-set="count_opportunity" t-value="count_opportunity+1"/>
|
|
</t>
|
|
<t t-set="count_so" t-value="0"/>
|
|
<t t-foreach="sale_order_portal" t-as="s">
|
|
<t t-set="count_so" t-value="count_so+1"/>
|
|
</t>
|
|
<t t-set="count_rfq" t-value="0"/>
|
|
<t t-foreach="rfq_portal" t-as="r">
|
|
<t t-set="count_rfq" t-value="count_rfq+1"/>
|
|
</t>
|
|
<t t-set="count_po" t-value="0"/>
|
|
<t t-foreach="purchase_orders_portal" t-as="p">
|
|
<t t-set="count_po" t-value="count_po+1"/>
|
|
</t>
|
|
<t t-set="count_project" t-value="0"/>
|
|
<t t-foreach="projects_portal" t-as="pr">
|
|
<t t-set="count_project" t-value="count_project+1"/>
|
|
</t>
|
|
<t t-set="count_invoice" t-value="0"/>
|
|
<t t-foreach="invoices_portal" t-as="in">
|
|
<t t-set="count_invoice" t-value="count_invoice+1"/>
|
|
</t>
|
|
<t t-set="count_bill" t-value="0"/>
|
|
|
|
<!-- End of setting the count of data-->
|
|
|
|
<div class="portal_dashboard">
|
|
|
|
<!-- Adding each record and their count-->
|
|
|
|
<div style="width:70%;margin-left:20%;margin-right:auto;">
|
|
<div style="display: flex;flex-wrap:wrap;">
|
|
<div class="card-group row"
|
|
style="margin-top:50px;display:block; margin-bottom:1%;">
|
|
<div class="col main_box">
|
|
<div class="card " style="width:200px;">
|
|
<img src="/portal_dashboard/static/src/images/q1.png"
|
|
class="card-img-top"
|
|
alt="..." style="width:50px;"/>
|
|
|
|
<div class="card-body">
|
|
<h5 class="card-title"
|
|
style="text-align:right;">
|
|
Quotation
|
|
<b>
|
|
<t t-esc="count_quotation"/>
|
|
</b>
|
|
</h5>
|
|
</div>
|
|
<div class="card-footer card_footer">
|
|
<small class="text-muted">
|
|
<a href="/my/quotes">
|
|
<button class="button_style">
|
|
View
|
|
</button>
|
|
</a>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col main_box">
|
|
<div class="card " style="width:200px;">
|
|
<img src="/portal_dashboard/static/src/images/rfq.png"
|
|
class="card-img-top"
|
|
alt="..." style="width:50px;"/>
|
|
<div class="card-body">
|
|
<h5 class="card-title"
|
|
style="text-align:right;">
|
|
RFQ
|
|
<b>
|
|
<t t-esc="count_rfq"/>
|
|
</b>
|
|
</h5>
|
|
|
|
</div>
|
|
<div class="card-footer card_footer">
|
|
<small class="text-muted">
|
|
<a href="/my/rfq">
|
|
<button class="button_style">
|
|
View
|
|
</button>
|
|
</a>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col main_box">
|
|
<div class="card " style="width:200px;">
|
|
<img src="/portal_dashboard/static/src/images/so.png"
|
|
class="card-img-top"
|
|
alt="..." style="width:50px;"/>
|
|
<div class="card-body">
|
|
<h5 class="card-title"
|
|
style="text-align:right;">
|
|
Sale Order
|
|
<b>
|
|
<t t-esc="count_so"/>
|
|
</b>
|
|
</h5>
|
|
|
|
</div>
|
|
<div class="card-footer card_footer">
|
|
<small class="text-muted">
|
|
<a href="/my/orders">
|
|
<button class="button_style">
|
|
View
|
|
</button>
|
|
</a>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col main_box">
|
|
<div class="card " style="width:200px;">
|
|
<img src="/portal_dashboard/static/src/images/po.png"
|
|
class="card-img-top"
|
|
alt="..." style="width:50px;"/>
|
|
<div class="card-body">
|
|
<h5 class="card-title"
|
|
style="text-align:right;">
|
|
Purchase Order
|
|
<b>
|
|
<t t-esc="count_po"/>
|
|
</b>
|
|
</h5>
|
|
|
|
</div>
|
|
<div class="card-footer card_footer">
|
|
<small class="text-muted">
|
|
<a href="/my/purchase">
|
|
<button class="button_style">
|
|
View
|
|
</button>
|
|
</a>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="display: flex;flex-wrap:wrap; margin-bottom:1%;">
|
|
<div class="card-group row"
|
|
style="margin-top:50px;display:block;">
|
|
<div class="col main_box">
|
|
<div class="card" style="width:200px;">
|
|
<img src="/portal_dashboard/static/src/images/project.png"
|
|
class="card-img-top"
|
|
alt="..." style="width:50px;"/>
|
|
<div class="card-body">
|
|
<h5 class="card-title"
|
|
style="text-align:right;">
|
|
Projects
|
|
<b>
|
|
<t t-esc="count_project"/>
|
|
</b>
|
|
</h5>
|
|
|
|
</div>
|
|
<div class="card-footer card_footer">
|
|
<small class="text-muted">
|
|
<a href="/my/projects">
|
|
<button class="button_style">
|
|
View
|
|
</button>
|
|
</a>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col main_box">
|
|
<div class="card" style="width:200px;">
|
|
<img src="/portal_dashboard/static/src/images/task.png"
|
|
class="card-img-top"
|
|
alt="..." style="width:50px;"/>
|
|
<div class="card-body">
|
|
<h5 class="card-title"
|
|
style="text-align:right;">
|
|
Tasks
|
|
<b>
|
|
<t t-esc="count_task"/>
|
|
</b>
|
|
</h5>
|
|
|
|
</div>
|
|
<div class="card-footer">
|
|
<small class="text-muted card_footer">
|
|
<a href="/my/tasks">
|
|
<button class="button_style">
|
|
View
|
|
</button>
|
|
</a>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col main_box">
|
|
<div class="card " style="width:200px;">
|
|
<img src="/portal_dashboard/static/src/images/bill.png"
|
|
class="card-img-top"
|
|
alt="..." style="width:50px;"/>
|
|
<div class="card-body">
|
|
<h5 class="card-title"
|
|
style="text-align:right;">
|
|
Bill & Invoices
|
|
<b>
|
|
<t t-esc="count_invoice"/>
|
|
</b>
|
|
</h5>
|
|
|
|
</div>
|
|
<div class="card-footer card_footer">
|
|
<small class="text-muted">
|
|
<a href="/my/invoices">
|
|
<button class="button_style">
|
|
View
|
|
</button>
|
|
</a>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- End of adding each record and their count-->
|
|
|
|
<t t-if="show_so_q">
|
|
<div class="container container_style">
|
|
<div class="row" style="margin-top:1%;">
|
|
<div style="float:left;width:50%" class="col">
|
|
<table class="table">
|
|
<div class="number_project">
|
|
Latest
|
|
<t t-esc="number_so_portal"/>
|
|
Quotations
|
|
</div>
|
|
<thead>
|
|
<tr>
|
|
<th>Order Number</th>
|
|
<th>Order Date</th>
|
|
</tr>
|
|
</thead>
|
|
<tboady id="portal_top_product">
|
|
<t t-foreach="quotations_limited"
|
|
t-as="quotation">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="quotation.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="quotation.date_order"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tboady>
|
|
</table>
|
|
</div>
|
|
<div style="float:right;margin-left:5%;width:50%;"
|
|
class="col">
|
|
<table class="table">
|
|
<div class="number_project">
|
|
Latest
|
|
<t t-esc="number_so_portal"/>
|
|
Sale order
|
|
</div>
|
|
<thead>
|
|
<tr>
|
|
<th>Order Number</th>
|
|
<th>Order Date</th>
|
|
<th>State</th>
|
|
</tr>
|
|
</thead>
|
|
<tboady id="portal_top_product">
|
|
<t t-foreach="sale_orders_limited"
|
|
t-as="sale_order">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="sale_order.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="sale_order.date_order"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="sale_order.state"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tboady>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
|
|
<div class="row row-cols-1 row-cols-md-2 g-4"
|
|
id="analysis_data"
|
|
style="width:70%;margin-left:25%;margin-right:auto;height:100%;">
|
|
<div class="row row-cols-1 row-cols-md-2 g-4 second_div">
|
|
<div class="col cell" colspan="2"
|
|
style="padding:1%;width:100%;">
|
|
<div class="card cell">
|
|
<div class="card-body">
|
|
<div class="card-text card_text">
|
|
<canvas id="sales_pie"/>
|
|
</div>
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<t t-if="show_po_rfq">
|
|
<div class="container"
|
|
style="width:100%;margin-top:5%;margin-left:15%;border:1px solid gray;">
|
|
<div class="row" style="margin-top:1%;">
|
|
<div style="float:left;width:50%" class="col">
|
|
<table class="table">
|
|
<div class="number_project">
|
|
Latest
|
|
<t t-esc="number_po_portal"/>
|
|
RFQ
|
|
</div>
|
|
<thead>
|
|
<tr>
|
|
<th>Reference</th>
|
|
<th>Order Date</th>
|
|
</tr>
|
|
</thead>
|
|
<tboady id="portal_top_product">
|
|
<t t-foreach="rfq_limited" t-as="rfq">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="rfq.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="rfq.date_order"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tboady>
|
|
</table>
|
|
</div>
|
|
<div style="float:right;margin-left:5%;width:50%;"
|
|
class="col">
|
|
<table class="table">
|
|
<div class="number_project">
|
|
Latest
|
|
<t t-esc="number_po_portal"/>
|
|
Purchase order
|
|
</div>
|
|
<thead>
|
|
<tr>
|
|
<th>Reference</th>
|
|
<th>Order Date</th>
|
|
<th>State</th>
|
|
</tr>
|
|
</thead>
|
|
<tboady id="portal_top_product">
|
|
<t t-foreach="purchase_orders_limited"
|
|
t-as="purchase_order">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="purchase_order.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="purchase_order.date_approve"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="purchase_order.state"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tboady>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
|
|
<div class="row row-cols-1 row-cols-md-2 g-4"
|
|
id="analysis_data" style="width:70%;margin-left:25%;margin-right:auto;height:100%;">
|
|
<div class="row row-cols-1 row-cols-md-2 g-4 second_div">
|
|
<div class="col cell" colspan="2"
|
|
style="padding:1%;width:100%;">
|
|
<div class="card cell">
|
|
<div class="card-body">
|
|
<div class="card-text card_text">
|
|
<canvas id="purchase_pie"/>
|
|
</div>
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<t t-if="show_account">
|
|
<div class="container container_style">
|
|
<div class="row" style="margin-top:1%;">
|
|
<div style="float:left;width:50%" class="col">
|
|
<table class="table">
|
|
<div class="number_project">
|
|
Latest
|
|
<t t-esc="number_account_portal"/>
|
|
Invoice
|
|
</div>
|
|
<thead>
|
|
<tr>
|
|
<th>Invoice #</th>
|
|
<th>Invoice Date</th>
|
|
<th>Due Date</th>
|
|
<th>Status</th>
|
|
<th>Amount Due</th>
|
|
</tr>
|
|
</thead>
|
|
<tboady id="portal_top_product">
|
|
<t t-foreach="invoices_limited"
|
|
t-as="invoice">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="invoice.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="invoice.invoice_date"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="invoice.invoice_date"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="invoice.state"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="invoice.amount_total_signed"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tboady>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
|
|
<div class="row row-cols-1 row-cols-md-2 g-4"
|
|
id="analysis_data" style="width:70%;margin-left:25%;margin-right:auto;height:100%;">
|
|
<div class="row row-cols-1 row-cols-md-2 g-4 second_div">
|
|
<div class="col cell" colspan="2"
|
|
style="padding:1%;width:100%;">
|
|
<div class="card cell">
|
|
<div class="card-body">
|
|
<div class="card-text card_text">
|
|
<canvas id="account_pie"/>
|
|
</div>
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<t t-if="show_project">
|
|
<div class="container"
|
|
style="width:100%;margin-top:2%;margin-left:16%;border:1px solid gray;margin-bottom:1%;">
|
|
<div class="row" style="margin-top:1%;">
|
|
<div style="float:left;width:50%" class="col">
|
|
<table class="table">
|
|
<div class="number_project">
|
|
Latest
|
|
<t t-esc="number_project_portal"/>
|
|
Projects
|
|
</div>
|
|
<thead>
|
|
<tr>
|
|
<th>Project</th>
|
|
<th>Start Date</th>
|
|
<th>Expiry Date</th>
|
|
</tr>
|
|
</thead>
|
|
<tboady id="portal_top_product">
|
|
<t t-foreach="projects_limited"
|
|
t-as="project">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="project.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="project.date_start"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="project.date"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tboady>
|
|
</table>
|
|
</div>
|
|
<div style="float:right;margin-left:5%;width:50%;"
|
|
class="col">
|
|
<table class="table">
|
|
<div class="number_project">
|
|
Latest
|
|
<t t-esc="number_project_portal"/>
|
|
Tasks
|
|
</div>
|
|
<thead>
|
|
<tr>
|
|
<th>Task</th>
|
|
<th>Project</th>
|
|
<th>Deadline</th>
|
|
</tr>
|
|
</thead>
|
|
<tboady id="portal_top_product">
|
|
<t t-foreach="tasks_limited"
|
|
t-as="task">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="task.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="task.project_id['name']"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="task.date_deadline"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tboady>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
</odoo>
|
|
|