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.
 
 
 
 
 

489 lines
26 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Portal view replaced dashboard template-->
<template id="my_account_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 container">
<!-- Adding each record and their count-->
<div>
<div style="display: flex;flex-wrap:wrap;width: 100%;justify-content: space-between;">
<div class="card-group row"
style="margin-top:50px;margin-bottom:1%;width: 100%; gap: 1rem;">
<div class="col main_box">
<div class="card quotation">
<div class="card-body">
<div class="image-icon">
<img src="/portal_dashboard/static/src/images/q2.png"
class="card-img-top"
alt="..." style="width:50px;"/>
</div>
<h5 class="word-text">
Quotation
</h5>
<span class="count-div">
<t t-esc="count_quotation"/>
</span>
<div class="view-bar">
<a href="/my/quotes">
<button class="btn btn-trans">
View
<i class="fa fa-thin fa-arrow-right"></i>
</button>
</a>
</div>
</div>
</div>
</div>
<div class="col main_box">
<div class="card quotation">
<div class="card-body">
<div class="image-icon">
<img src="/portal_dashboard/static/src/images/financial-profit.png"
class="card-img-top"
alt="..." style="width:50px;"/>
</div>
<h5 class="word-text">
Sale Order
</h5>
<span class="count-div">
<t t-esc="count_so"/>
</span>
</div>
<div class="view-bar">
<a href="/my/orders">
<button class="btn btn-trans">
View
<i class="fa fa-thin fa-arrow-right"></i>
</button>
</a>
</div>
</div>
</div>
<div class="col main_box">
<div class="card quotation">
<div class="card-body">
<div class="image-icon">
<img src="/portal_dashboard/static/src/images/po2.png"
class="card-img-top"
alt="..." style="width:50px;"/>
</div>
<h5 class="word-text">
Purchase Order
</h5>
<span class="count-div">
<t t-esc="count_po"/>
</span>
</div>
<div class="view-bar">
<a href="/my/purchase">
<button class="btn btn-trans">
View
<i class="fa fa-thin fa-arrow-right"></i>
</button>
</a>
</div>
</div>
</div>
</div>
</div>
<div style="display: flex;flex-wrap:wrap;width: 100%;justify-content: space-between;">
<div class="card-group row"
style="margin-top:50px;margin-bottom:1%;width: 100%; gap: 1rem;">
<div class="col main_box">
<div class="card quotation">
<div class="card-body">
<div class="image-icon">
<img src="/portal_dashboard/static/src/images/project2.png"
class="card-img-top"
alt="..."
style="width:50px;"/>
</div>
<h5 class="word-text">
Projects
</h5>
<span class="count-div">
<t t-esc="count_project"/>
</span>
</div>
<div class="view-bar">
<a href="/my/projects">
<button class="btn btn-trans">
View
<i class="fa fa-thin fa-arrow-right"></i>
</button>
</a>
</div>
</div>
</div>
<div class="col main_box">
<div class="card quotation">
<div class="card-body">
<div class="image-icon">
<img src="/portal_dashboard/static/src/images/task2.png"
class="card-img-top"
alt="..."
style="width:50px;"/>
</div>
<h5 class="word-text">
Tasks
</h5>
<span class="count-div">
<t t-esc="count_task"/>
</span>
</div>
<div class="view-bar">
<a href="/my/tasks">
<button class="btn btn-trans">
View
<i class="fa fa-thin fa-arrow-right"></i>
</button>
</a>
</div>
</div>
</div>
<div class="col main_box">
<div class="card quotation">
<div class="card-body">
<img src="/portal_dashboard/static/src/images/invoice.png"
class="card-img-top"
alt="..."
style="width:50px;"/>
<h5 class="word-text">
Bill &amp; Invoices
</h5>
<span class="count-div">
<t t-esc="count_invoice"/>
</span>
</div>
<div class="view-bar">
<a href="/my/invoices">
<button class="btn btn-trans">
View
<i class="fa fa-thin fa-arrow-right"></i>
</button>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End of adding each record and their count-->
<h1 class="heading2 py-4">Transaction Count Analysis</h1>
<div class="container py-2">
<div class="row">
<div class="col-12 col-md-4 col-4">
<div class="card-body chart">
<div class="card-text card_text"
style="width: 300px;">
<canvas id="sales_pie"/>
</div>
<br/>
</div>
</div>
<div class="col-12 col-md-4 col-4">
<div class="card-body chart">
<div class="card-text card_text"
style="width: 300px;">
<canvas class="img-fluid"
id="purchase_pie"/>
</div>
<br/>
</div>
</div>
<div class="col-12 col-md-4 col-4">
<div class="card-body chart">
<div class="card-text card_text"
style="width: 300px;">
<canvas id="account_pie"/>
</div>
<br/>
</div>
</div>
</div>
</div>
<t t-if="show_so_q">
<div class="container">
<div class="row" style="margin-top:1%;">
<div class="col-12 col-md-6">
<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 class="col-12 col-md-6">
<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>
</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>
</tr>
</t>
</tboady>
</table>
</div>
</div>
</div>
</t>
<t t-if="show_po_rfq">
<t t-if="rfq_limited">
<div class="container">
<div class="row" style="margin-top:1%;">
<div class="col col-md-6">
<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 class="col col-md-6">
<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>
</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>
</tr>
</t>
</tboady>
</table>
</div>
</div>
</div>
</t>
</t>
<t t-if="show_account">
<t t-if="invoices_limited">
<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"/>
Bill &amp; Invoices
</div>
<thead>
<tr>
<th>Invoice #</th>
<th>Invoice Date</th>
<th>Due Date</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.amount_total_signed"/>
</td>
</tr>
</t>
</tboady>
</table>
</div>
</div>
</div>
</t>
</t>
<t t-if="show_project">
<t t-if="projects_limited">
<div class="container">
<div class="row" style="margin-top:1%;">
<div class="col col-md-6">
<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 class="col col col-md-6">
<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>
</t>
</div>
</t>
</template>
</odoo>