flectra/addons/purchase/views/portal_templates.xml
2018-01-16 02:34:37 -08:00

156 lines
6.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<template id="portal_my_home_menu_purchase" name="Portal layout : purchase menu entries" inherit_id="portal.portal_layout" priority="25">
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
<li t-if="page_name == 'purchase' or purchase_order">
<a t-if="purchase_order" t-attf-href="/my/purchase?{{ keep_query() }}">Purchase Orders</a>
<t t-else="">Purchase Orders</t>
</li>
<li t-if="purchase_order">
<t t-esc="purchase_order.name"/>
</li>
</xpath>
</template>
<template id="portal_my_home_purchase" name="Portal My Home : purchase entry" inherit_id="portal.portal_my_home" priority="25">
<xpath expr="//ul[hasclass('o_portal_docs')]" position="inside">
<li t-if="purchase_count" class="list-group-item">
<span class="badge" t-esc="purchase_count"/>
<a href="/my/purchase">Purchase Orders</a>
</li>
</xpath>
</template>
<template id="portal_my_purchase_orders" name="Portal: My Purchase Orders">
<t t-call="portal.portal_layout">
<h3>Purchase Orders
<t t-call="portal.portal_searchbar"/>
</h3>
<div t-if="orders" class="panel panel-default">
<div class="table-responsive"><table class="table table-hover o_portal_my_doc_table">
<thead>
<tr class="active">
<th>Purchase Orders #</th>
<th>Order Date</th>
<th></th>
<th>Total</th>
</tr>
</thead>
<t t-foreach="orders" t-as="order">
<tr>
<td>
<a t-attf-href="/my/purchase/#{order.id}?#{keep_query()}"><t t-esc="order.name"/></a>
</td>
<td><span t-field="order.date_order"/></td>
<td>
<t t-if="order.state == 'cancel'">
<span class="label label-default"><i class="fa fa-fw fa-remove"/> Cancelled</span>
</t>
</td>
<td><span t-field="order.amount_total" t-options='{"widget": "monetary", "display_currency": order.currency_id}'/>
</td>
</tr>
</t>
</table></div>
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="portal.pager"/>
</div>
</div>
</t>
</template>
<template id="portal_my_purchase_order" name="Portal: My Purchase Order">
<t t-call="portal.portal_layout">
<t t-set="purchase_order" t-value="order"/>
<div id="optional_placeholder"></div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
<div class="row">
<div class="col-md-12">
<h4>
<t t-call='portal.record_pager'/>
Purchase Order
<span t-esc="order.name"/>
</h4>
</div>
</div>
</div>
<div class="panel-body">
<div class="mb8">
<strong>Date:</strong> <span t-field="order.date_order" t-options='{"widget": "date"}'/>
</div>
<div class="row">
<div class="col-md-6">
<strong>Product</strong>
</div>
<div class="col-md-2 text-right">
<strong>Unit Price</strong>
</div>
<div class="col-md-2 text-right">
<strong>Quantity</strong>
</div>
<div class="col-md-2 text-right">
<strong>Subtotal</strong>
</div>
</div>
<t t-foreach="order.order_line" t-as="ol">
<div class="row purchases_vertical_align">
<div class="col-md-1 text-center">
<img t-att-src="'/web/image/purchase.order.line/%s/product_image/48x48' % ol.id"/>
</div>
<div id='product_name' class="col-md-5">
<span t-esc="ol.product_id.name"/>
</div>
<div class="col-md-2 text-right">
<span t-field="ol.price_unit" t-options='{"widget": "monetary", "display_currency": order.currency_id}'/>
</div>
<div class="col-md-2 text-right">
<span t-esc="ol.product_qty"/>
</div>
<div class="col-md-2 text-right">
<span t-field="ol.price_subtotal" t-options='{"widget": "monetary", "display_currency": order.currency_id}'/>
</div>
</div>
</t>
<hr/>
<div class="row">
<div class="col-md-12 text-right">
<div class="row">
<div class="col-md-10 text-right">
Untaxed Amount:
</div>
<div class="col-md-2 text-right">
<span t-field="order.amount_untaxed" t-options='{"widget": "monetary", "display_currency": order.currency_id}'/>
</div>
</div>
<div class="row">
<div class="col-md-10 text-right">
Taxes:
</div>
<div class="col-md-2 text-right">
<span t-field="order.amount_tax" t-options='{"widget": "monetary", "display_currency": order.currency_id}'/>
</div>
</div>
<div class="row">
<div class="col-md-10 text-right">
<strong>Total:</strong>
</div>
<div class="col-md-2 text-right">
<strong><span t-field="order.amount_total" t-options='{"widget": "monetary", "display_currency": order.currency_id}'/></strong>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="oe_structure mb32"/>
</t>
</template>
</flectra>