2014-01-28 11:31:01 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<openerp>
|
|
|
|
<data>
|
|
|
|
|
2014-06-25 12:03:23 +00:00
|
|
|
<template id="assets_editor" inherit_id="website.assets_frontend" name="Event Sale">
|
|
|
|
<xpath expr="." position="inside">
|
|
|
|
<script type="text/javascript" src="/website_event_sale/static/src/js/website.tour.event_sale.js"></script>
|
|
|
|
</xpath>
|
2014-02-06 13:50:36 +00:00
|
|
|
</template>
|
|
|
|
|
2014-01-28 11:31:01 +00:00
|
|
|
<template id="index" inherit_id="website_event.index" name="Event's Ticket">
|
|
|
|
<xpath expr="//li[@t-foreach='event_ids']/div/h4" position="before">
|
|
|
|
<t t-if="event.state in ['draft', 'confirm'] and event.event_ticket_ids">
|
|
|
|
<span t-if="not event.seats_available" class="label label-danger pull-right">Sold Out</span>
|
|
|
|
<span t-if="event.seats_available and event.seats_available <= ((event.seats_max or 0) / 4)" class="label pull-right label-info">
|
|
|
|
Only <t t-esc="event.seats_available"/> Remaining
|
|
|
|
</span>
|
|
|
|
</t>
|
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
2014-01-30 23:39:51 +00:00
|
|
|
<template id="cart" inherit_id="website_sale.cart" name="My Cart Event's Price">
|
2014-01-29 09:42:20 +00:00
|
|
|
<xpath expr="//td[@name='price']/t" position="attributes">
|
|
|
|
<attribute name="t-if">abs(line.product_id.lst_price - line.price_unit) > 0.2 and not line.product_id.event_ok</attribute>
|
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
2014-08-31 14:56:44 +00:00
|
|
|
<template id="event_description_full" inherit_id="website_event.event_description_full" customize_show="True" name="Event's Ticket form">
|
2014-01-28 11:31:01 +00:00
|
|
|
<xpath expr="//div[@t-field='event.description']" position="before">
|
2014-05-02 14:01:52 +00:00
|
|
|
<form t-attf-action="/event/cart/update?event_id=#{ event.id }" method="post" t-if="event.event_ticket_ids">
|
2014-02-03 15:16:48 +00:00
|
|
|
<table itemprop="offers" class="table table-striped">
|
2014-01-28 11:31:01 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Ticket Type</th>
|
|
|
|
<th style="min-width: 100px">Sales End</th>
|
|
|
|
<th style="min-width: 100px">Price</th>
|
|
|
|
<th></th>
|
|
|
|
<th>Quantity</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2014-04-22 12:31:53 +00:00
|
|
|
<t t-foreach="event.event_ticket_ids" t-as="ticket">
|
2014-04-24 13:45:33 +00:00
|
|
|
<tr itemscope="itemscope" itemtype="http://data-vocabulary.org/Offer" t-if="not ticket.is_expired">
|
|
|
|
<td itemscope="itemscope" itemtype="http://data-vocabulary.org/Product">
|
2014-02-03 15:16:48 +00:00
|
|
|
<div itemprop="name" t-field="ticket.name"/>
|
|
|
|
<div><small itemprop="description" t-field="ticket.product_id.description_sale"/></div>
|
2014-01-28 11:31:01 +00:00
|
|
|
</td>
|
2014-02-03 15:16:48 +00:00
|
|
|
<td><span itemprop="priceValidUntil" t-field="ticket.deadline"/></td>
|
2014-01-28 11:31:01 +00:00
|
|
|
<td>
|
|
|
|
<t t-if="ticket.price or editable"><span t-field="ticket.price" t-field-options='{
|
|
|
|
"widget": "monetary",
|
|
|
|
"display_currency": "website.pricelist_id.currency_id"
|
|
|
|
}'/>
|
2014-02-11 13:56:10 +00:00
|
|
|
<span itemprop="price" style="display:none;" t-esc="ticket.price"/>
|
|
|
|
<span itemprop="priceCurrency" style="display:none;" t-esc="website.pricelist_id.currency_id.name"/>
|
2014-01-28 11:31:01 +00:00
|
|
|
</t>
|
|
|
|
<t t-if="not ticket.price and not editable">
|
|
|
|
<span>Free</span>
|
|
|
|
</t>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span t-if="ticket.seats_max and ((ticket.seats_reserved or 0)*100 / ticket.seats_max)>75" class="text-muted">
|
|
|
|
<t t-esc="ticket.seats_max - ticket.seats_reserved"/> <span>left</span>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<select t-if="ticket.seats_available" t-attf-name="ticket-#{ ticket.id }" class="form-control">
|
|
|
|
<t t-foreach="range(0, ticket.seats_available > 9 and 10 or ticket.seats_available+1 )" t-as="nb"><option t-esc="nb"/></t>
|
|
|
|
</select>
|
|
|
|
<span t-if="not ticket.seats_available">Sold Out</span>
|
|
|
|
</td>
|
2014-04-22 12:31:53 +00:00
|
|
|
</tr>
|
|
|
|
</t>
|
2014-01-28 11:31:01 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<button type="submit" class="btn btn-primary btn-lg pull-right" t-if="event.seats_available">Order Now</button>
|
|
|
|
<div class="clearfix"/>
|
|
|
|
<hr/>
|
|
|
|
</form>
|
|
|
|
</xpath>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</data>
|
|
|
|
</openerp>
|