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.
196 lines
8.6 KiB
196 lines
8.6 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- Template for my contracts menu in portal-->
|
|
<template id="portal_my_home_contracts" name="My Contracts"
|
|
customize_show="True" inherit_id="portal.portal_my_home">
|
|
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
|
|
<t t-call="portal.portal_docs_entry">
|
|
<t t-set="title">My Contracts</t>
|
|
<t t-set="url" t-value="'/my/contracts'"/>
|
|
<t t-set="placeholder_count" t-value="'contract_count'"/>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Template for my contracts-->
|
|
<template id="tmp_contract_details" name="My Contracts">
|
|
<t t-call="website.layout">
|
|
<div class="oe_structure">
|
|
<br/>
|
|
<center>
|
|
<h3>My Contracts</h3>
|
|
</center>
|
|
<br/>
|
|
<table class="table-striped table"
|
|
style="margin-right: 180px; margin-left: 5px;">
|
|
<thead style="font-size: 23px;">
|
|
<tr>
|
|
<h6>
|
|
<b>
|
|
<th>Contract Name</th>
|
|
<th>Customer Name</th>
|
|
<th>Start Date</th>
|
|
<th>End Date</th>
|
|
<th>Date of Next Invoice</th>
|
|
<th>Stage</th>
|
|
<th>Print</th>
|
|
</b>
|
|
</h6>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="records" t-as="order">
|
|
<tr>
|
|
<td>
|
|
<a t-attf-href='/contracts/{{order.id}}/'
|
|
t-esc="order.name"/>
|
|
</td>
|
|
<td>
|
|
<span t-esc="order.partner_id.name"/>
|
|
</td>
|
|
<td>
|
|
<span t-esc="order.date_start"/>
|
|
</td>
|
|
<td>
|
|
<span t-esc="order.date_end"/>
|
|
</td>
|
|
<td>
|
|
<span t-esc="order.next_invoice_date"/>
|
|
</td>
|
|
<td>
|
|
<span t-esc="order.state"/>
|
|
</td>
|
|
<td>
|
|
<a t-attf-class='btn btn-success'
|
|
t-attf-href='/report/pdf/{{order.id}}'>
|
|
Report
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
<!-- Template for Subscription contract details -->
|
|
<template id="contract_details" name="Subscription contract details">
|
|
<t t-call="website.layout">
|
|
<div class="container">
|
|
<t t-call="web.external_layout">
|
|
<div class="page">
|
|
<h2>
|
|
<t t-esc='records.name'/>
|
|
</h2>
|
|
</div>
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<th>Customer:</th>
|
|
<td>
|
|
<t t-if="records.partner_id.name">
|
|
<t t-esc="records.partner_id.name"/>
|
|
</t>
|
|
</td>
|
|
<th>Reference:</th>
|
|
<td>
|
|
<t t-if="records.reference">
|
|
<t t-esc="records.reference"/>
|
|
</t>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Recurring Period:</th>
|
|
<td>
|
|
<t t-if="records.recurring_period">
|
|
<t t-esc="records.recurring_period"/>
|
|
<t t-esc="records.recurring_period_interval"/>
|
|
</t>
|
|
</td>
|
|
<th>Company:</th>
|
|
<td>
|
|
<t t-if="records.company_id">
|
|
<t t-esc="records.company_id.name"/>
|
|
</t>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Start Date:</th>
|
|
<td>
|
|
<t t-if="records.date_start">
|
|
<t t-esc="records.date_start"/>
|
|
</t>
|
|
</td>
|
|
<th>End Date:</th>
|
|
<td>
|
|
<t t-if="records.date_end">
|
|
<t t-esc="records.date_end"/>
|
|
</t>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Stage:</th>
|
|
<td>
|
|
<t t-if="records.state">
|
|
<t t-esc="records.state"/>
|
|
</t>
|
|
</td>
|
|
<th>Date of Next Invoice:</th>
|
|
<td>
|
|
<t t-if="records.next_invoice_date">
|
|
<t t-esc="records.next_invoice_date"/>
|
|
</t>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Contract Lines</h2>
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<h2>
|
|
<th scope="col">Product</th>
|
|
</h2>
|
|
<h2>
|
|
<th scope="col">Description</th>
|
|
</h2>
|
|
<h2>
|
|
<th scope="col">Order Qty</th>
|
|
</h2>
|
|
<h2>
|
|
<th scope="col">Unit Price</th>
|
|
</h2>
|
|
<h2>
|
|
<th scope="col">Subtotal</th>
|
|
</h2>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="records.contract_line_ids"
|
|
t-as='res'>
|
|
<tr>
|
|
<td>
|
|
<t t-esc="res.product_id.name"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="res.description"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="res.qty_ordered"/>
|
|
<t t-esc='res.product_uom_id.name'/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="res.price_unit"
|
|
t-options="{'widget': 'monetary', 'display_currency': res.currency_id}"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="res.sub_total"
|
|
t-options="{'widget': 'monetary', 'display_currency': res.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
</odoo>
|
|
|