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.
281 lines
14 KiB
281 lines
14 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="portal_my_home_menu_license" name="Portal layout : License menu entries" inherit_id="portal.portal_breadcrumbs">
|
|
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
|
<li t-if="page_name in['license','license_view']" t-attf-class="breadcrumb-item #{'active ' if not event else ''}">
|
|
<a t-if="page_name == 'license_view'" href="/my/license">My
|
|
License</a>
|
|
<t t-else="">My
|
|
License</t>
|
|
</li>
|
|
<li t-if="page_name == 'license_view'" class="breadcrumb-item active">
|
|
<t t-esc="my_license['license_number']"/>
|
|
</li>
|
|
</xpath>
|
|
</template>
|
|
<!-- Menu in portal to show license-->
|
|
<template id="website_license" name="my_license"
|
|
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="title">License</t>
|
|
<t t-set="url" t-value="'/my/license'"/>
|
|
<t t-set="placeholder_count" t-value="'license'"/>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
<!--certificate normal template-->
|
|
<template id="portal_my_license" name="My Certificates">
|
|
<t t-call="portal.portal_layout">
|
|
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
|
<t t-call="portal.portal_searchbar"/>
|
|
<t t-call="certificate_license_expiry.portal_my_license_tree"/>
|
|
</t>
|
|
</template>
|
|
<!--certificate tree template-->
|
|
<template id="portal_my_license_tree" name="My License">
|
|
<div class="search_license">
|
|
<t t-if="not license">
|
|
<h5>There Are Currently No License For Your Account</h5>
|
|
</t>
|
|
<t t-if="license" t-call="portal.portal_table">
|
|
<thead>
|
|
<tr class="active">
|
|
<th>Events #</th>
|
|
<th class="text-right">Customer</th>
|
|
<th class="text-right">Start Date</th>
|
|
<th class="text-right">Expire Date</th>
|
|
<th class="text-right">Project</th>
|
|
<th class="text-right">Task</th>
|
|
<th class="text-right">Product</th>
|
|
</tr>
|
|
</thead>
|
|
<t t-foreach="license" t-as="license">
|
|
<tr>
|
|
<td>
|
|
<a class="my_license_link"
|
|
t-attf-data-id="{{license.id}}"
|
|
t-attf-href="/my/license/form/{{license.id}}">
|
|
<t t-esc="license.license_number"/>
|
|
</a>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="license.customer_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="license.start_date"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="license.expire_date"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="license.project_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="license.task_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="license.product_id.name"/>
|
|
</td>
|
|
<td class="text-center">
|
|
<span t-if="license.state == 'new'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:deepskyblue">New
|
|
</span>
|
|
<span t-if="license.state == 'active'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:green">Active
|
|
</span>
|
|
<span t-if="license.state == 'expired_soon'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:yellow">Expired Soon
|
|
</span>
|
|
<span t-if="license.state == 'expired'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:red">Expired
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
</template>
|
|
<!-- License Form Template-->
|
|
<template id="license_portal_form_template" name="License Portal Content">
|
|
<t t-call="portal.portal_layout">
|
|
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
|
<t t-call="portal.portal_searchbar"/>
|
|
<!-- 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="my_license['license_number']"/>
|
|
</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(my_license['customer_id'].avatar_1024)"
|
|
alt="Contact"/>
|
|
</div>
|
|
<div class="col ps-0"
|
|
style="min-width: 150px">
|
|
<span t-esc="my_license['customer_id']"
|
|
t-options='{"widget": "contact", "fields": ["name", "phone"], "no_marker": True}'/>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</t>
|
|
</t>
|
|
<!-- License Number -->
|
|
<div id="license_call_page_details"
|
|
class="col-12 col-lg justify-content-end">
|
|
<div t-attf-class="card #{'pb-5' if report_type == 'html' else ''}"
|
|
id="lic_portal_doc_content">
|
|
<div
|
|
style="height:700px;">
|
|
<div class="container">
|
|
<h4 class="mb-0" style="margin-left:15px;">
|
|
<br/>
|
|
<b>
|
|
<t t-esc="my_license['license_number']"/>
|
|
</b>
|
|
</h4>
|
|
<hr style="width:100%"/>
|
|
</div>
|
|
<!-- Page Content -->
|
|
<table class="table table-borderless">
|
|
<tr>
|
|
<th>Customer</th>
|
|
<td>
|
|
<t t-esc="my_license['customer_id'].name"/>
|
|
</td>
|
|
<th>Project</th>
|
|
<td>
|
|
<t t-esc="my_license['project_id'].name"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>License Type</th>
|
|
<td>
|
|
<t t-esc="my_license['license_types_id'].license_type"/>
|
|
</td>
|
|
<th>Task</th>
|
|
<td>
|
|
<t t-esc="my_license['task_id'].name"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Start Date</th>
|
|
<td>
|
|
<t t-esc="my_license['start_date']"/>
|
|
</td>
|
|
<th>Product</th>
|
|
<td>
|
|
<t t-esc="my_license['product_id'].name"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Expired Date</th>
|
|
<td>
|
|
<t t-esc="my_license['expire_date']"/>
|
|
</td>
|
|
<th>Responsible Person</th>
|
|
<td>
|
|
<t t-esc="my_license['user_id'].name"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Issued By</th>
|
|
<td>
|
|
<t t-esc="my_license['issued_company_id'].name"/>
|
|
</td>
|
|
<th>Company</th>
|
|
<td>
|
|
<t t-esc="my_license['company_id'].name"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Description</th>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4">
|
|
<t t-esc="my_license['description']"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
<!-- License group by template-->
|
|
<template id="license_group_by_template">
|
|
<t t-if="not license">
|
|
<h5>Choose An Group By option</h5>
|
|
</t>
|
|
<t t-if="license" t-call="portal.portal_table">
|
|
<tbody>
|
|
<t t-foreach="license" t-as="license">
|
|
<tr>
|
|
<th class="table-light" colspan="4">
|
|
<t t-esc="license['name']"/>
|
|
</th>
|
|
</tr>
|
|
<t t-foreach="license['data']" t-as="license">
|
|
<t t-foreach="license" t-as="data">
|
|
<tr>
|
|
<td>
|
|
<a href="#"
|
|
t-attf-href="/my/license/form/{{data.id}}">
|
|
<t t-esc="data.license_number"
|
|
t-value="data.id"/>
|
|
</a>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.product_id.name"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="data.license_types_id.license_type"/>
|
|
</td>
|
|
<td class="text-center">
|
|
<span t-if="data.state == 'new'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:deepskyblue">
|
|
New
|
|
</span>
|
|
<span t-if="data.state == 'active'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:green">Active
|
|
</span>
|
|
<span t-if="data.state == 'expired_soon'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:yellow">
|
|
Expired Soon
|
|
</span>
|
|
<span t-if="data.state == 'expired'"
|
|
class="badge badge-pill badge-secondary"
|
|
style="background-color:red">Expired
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</tbody>
|
|
</t>
|
|
</template>
|
|
</odoo>
|
|
|