'data': [
'event_sale_view.xml',
'event_sale_data.xml',
+ 'event_sale_report.xml',
+ 'views/report_registrationbadge.xml',
'security/ir.model.access.csv',
],
'demo': ['event_demo.xml'],
<field name="seats_max">5</field>
</record>
+
+ <record id="event.event_1" model="event.event">
+ <field name="badge_back"><![CDATA[
+ <h2>Program</h2>
+ <div><strong>Registrations</strong><small> are from 8:30 am, except on Friday from 9:00 am</small></div>
+ <div>
+ <strong>Lunch</strong><small> is served between 1:00 pm and 2:00 pm.</small>
+ </div>
+ <h2>Special Events</h2>
+ <table style="border: 1px solid black;">
+ <tr style="border: 1px solid black;">
+ <td class="text-center" width="15%"><strong>4/6</strong></td>
+ <td class="text-center" width="25%"><strong>19h00</strong></td>
+ <td><small>Barbecue Beer Event</small></td>
+ </tr>
+ <tr>
+ <td class="text-center"><strong>5/6</strong></td>
+ <td class="text-center"><strong>18h30</strong></td>
+ <td><small>Odoo Awards Ceremony</small></td>
+ </tr>
+ </table>
+ <br/>
+ <div class="row">
+ <div class="col-xs-5">
+ <p>
+ <i class="fa fa-twitter"/> #OpenDays
+ </p>
+ </div>
+ <div class="col-xs-6">
+ <div class="small">Wifi network: opendays</div>
+ <div class="small">Wifi password: odoo2014</div>
+ </div>
+ </div>
+ <div class="row">
+ <small class="col-xs-3" style="float: left; padding-right: 0px; padding-left: 0px;">sponsored by</small>
+ <div class="col-xs-2" style="padding-right: 0px; padding-left: 0px;">
+ <span>
+ <img class="img img-responsive" src="https://www.odoo.com/openerp_website/static/src/img/logo_white.png"/>
+ </span>
+ </div>
+ </div>
+ ]]></field>
+ <field name="badge_innerleft"><![CDATA[
+ <h2>Premium Tickets</h2>
+ <table class="text-center">
+ <tr>
+ <td width="10%"></td>
+ <td width="10%" style="height:45px; width:110px; border-radius: 90px 90px 0 0; -moz-border-radius: 90px 90px 0 0; -webkit-border-radius: 90px 90px 0 0; background:lightgrey; text-align: -webkit-center; padding-top: 10px;"><div>Full</div><div> Catering</div></td>
+ <td width="5%"></td>
+ <td width="10%" style="height:45px; width:110px; border-radius: 90px 90px 0 0; -moz-border-radius: 90px 90px 0 0; -webkit-border-radius: 90px 90px 0 0; background:lightgrey; text-align: -webkit-center; padding-top: 10px;"><div>BBQ &</div><div>Beer Event</div></td>
+ <td width="5%"></td>
+ <td width="10%" style="height:45px; width:110px; border-radius: 90px 90px 0 0; -moz-border-radius: 90px 90px 0 0; -webkit-border-radius: 90px 90px 0 0; background:lightgrey; text-align: -webkit-center; padding-top: 10px;"><div>Awards &</div> <div>Walking</div><div> Dinner</div></td>
+ <td width="10%"></td>
+ </tr>
+ <tr style="background:lightgrey; height: 15px;">
+ <td colspan="7"></td>
+ </tr>
+ <tr style="background:lightgrey; height: 35px;">
+ <td></td>
+ <td>Every Day</td>
+ <td colspan="3">June 4th</td>
+ <td>June 5th</td>
+ <td></td>
+ </tr>
+ </table>
+ <br/><br/>
+ <h2>Free Tickets</h2>
+ <table class="text-center">
+ <tr>
+ <td width="10%"></td>
+ <td width="10%" style="height:45px; width:110px; border-radius: 90px 90px 0 0; -moz-border-radius: 90px 90px 0 0; -webkit-border-radius: 90px 90px 0 0; background:lightgrey; text-align: -webkit-center; padding-top: 10px;"><div>Drinks</div></td>
+ <td width="5%"></td>
+ <td width="10%" style="height:45px; width:110px; border-radius: 90px 90px 0 0; -moz-border-radius: 90px 90px 0 0; -webkit-border-radius: 90px 90px 0 0; background:lightgrey; text-align: -webkit-center; padding-top: 10px;"><div>Premium</div><div>Ticket</div><div>onsite</div></td>
+ <td width="25%"></td>
+ </tr>
+ <tr style="background:lightgrey; height: 15px;">
+ <td colspan="5"></td>
+ </tr>
+ <tr style="background:lightgrey; height: 35px;">
+ <td></td>
+ <td>Every Day</td>
+ <td></td>
+ <td>60 €/day<div>30 €/Friday</div></td>
+ <td></td>
+ </tr>
+ </table>
+ ]]></field>
+ <field name="badge_innerright"><![CDATA[
+ <div>
+ <h2>Exhibition Hall</h2>
+ </div>
+ <div>
+ Picture of the exhibition hall
+ </div>
+ ]]></field>
+ </record>
+
</data>
</openerp>
['seats_max', 'registration_ids'], 20),
'event.event.ticket': (_get_ticket_events, ['seats_max'], 10),
}),
+ 'badge_back': fields.html('Badge Back', readonly=False, translate=True, states={'done': [('readonly', True)]}),
+ 'badge_innerleft': fields.html('Badge Innner Left', readonly=False, translate=True, states={'done': [('readonly', True)]}),
+ 'badge_innerright': fields.html('Badge Inner Right', readonly=False, translate=True, states={'done': [('readonly', True)]}),
}
_defaults = {
'event_ticket_ids': _get_tickets
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="paperformat_euro_lowmargin" model="report.paperformat">
+ <field name="name">European A4 low margin</field>
+ <field name="default" eval="True" />
+ <field name="format">A4</field>
+ <field name="page_height">0</field>
+ <field name="page_width">0</field>
+ <field name="orientation">Portrait</field>
+ <field name="margin_top">5</field>
+ <field name="margin_bottom">5</field>
+ <field name="margin_left">5</field>
+ <field name="margin_right">5</field>
+ <field name="header_line" eval="False" />
+ <field name="header_spacing">0</field>
+ <field name="dpi">80</field>
+ </record>
+ <report
+ id="action_report_registrationbadge"
+ model="event.registration"
+ string="Badge"
+ report_type="qweb-html"
+ name="event_sale.report_registrationbadge"
+ file="event_sale.report_registrationbadge"
+ />
+ <record id="action_report_registrationbadge" model="ir.actions.report.xml">
+ <field name="paperformat_id" ref="event_sale.paperformat_euro_lowmargin"/>
+ </record>
+
+ </data>
+</openerp>
\ No newline at end of file
</field>
</record>
+ <!-- Edit badge report form -->
+ <record id="view_event_form" model="ir.ui.view">
+ <field name="name">view_event_form</field>
+ <field name="model">event.event</field>
+ <field name="inherit_id" ref="event.view_event_form"/>
+ <field name="arch" type="xml">
+ <data>
+ <xpath expr="//notebook" position="inside">
+ <page string="Ticket Types">
+ <field name="event_ticket_ids" context="{'default_name': name}">
+ <tree string="Payments" editable="bottom">
+ <field name="name"/>
+ <field name="product_id" on_change='onchange_product_id(product_id)'/>
+ <field name="deadline"/>
+ <field name="price"/>
+ <field name="seats_max"/>
+ <field name="seats_reserved"/>
+ <field name="seats_unconfirmed"/>
+ </tree>
+ </field>
+ </page>
+ </xpath>
+ <field name="nb_register" position="after">
+ <field name="event_ticket_id" domain="[('event_id', '=', context.get('event_id'))]"/>
+ </field>
+ <xpath expr="//notebook" position="inside">
+ <page string="Badge">
+ <label for="badge_back" class="oe_edit_only">Badge (Back)</label>
+ <field name="badge_back" nolabel="1" placeholder="Event badge_back..."/>
+ <hr/>
+ <label for="badge_innerleft" class="oe_edit_only">Badge (Inner Left)</label>
+ <field name="badge_innerleft" nolabel="1" placeholder="Event badge_innerleft..."/>
+ <hr/>
+ <label for="badge_innerright" class="oe_edit_only">Badge (Inner Right)</label>
+ <field name="badge_innerright" nolabel="1" placeholder="Event badge_innerright..."/>
+ </page>
+ </xpath>
+ </data>
+ </field>
+ </record>
</data>
</openerp>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <template id="report_registrationbadge">
+ <t t-call="report.html_container">
+ <t t-foreach="docs" t-as="o">
+ <div class="page">
+ <div class="row">
+ <!-- Inner right -->
+ <div class="col-xs-6 text-center" style="padding-left:7mm; border-left:1px dashed black; height: 149mm; -webkit-transform:rotate(180deg); padding-top: 7mm">
+ <div>
+ <div class="row">
+ <div class="col-xs-12">
+ <div>
+ <span t-if="o.event_id.organizer_id.company_id.logo_web and o.event_id.organizer_id.is_company">
+ <img t-att-src="'data:image/png;base64,%s' % o.event_id.organizer_id.company_id.logo_web" style="max-height:1cm; max-width:4cm;"/>
+ </span>
+ <div>
+ <h5 t-field="o.event_id.name"/>
+ </div>
+ <div>
+ <h5>June 4th - 6th , 2014</h5>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-xs-12 text-center">
+ <t t-if="o.event_ticket_id">
+ <div>
+ <strong><span t-field="o.event_ticket_id"/></strong>
+ </div>
+ </t>
+ <div>
+ <t t-if="o.partner_id.is_company == True">
+ <small>
+ <h3 t-field="o.partner_id.name"/>
+ <h5 t-field="o.name"/>
+ </small>
+ </t>
+ </div>
+ </div>
+ </div>
+ <br/>
+ <div class="row">
+ <div class="col-xs-12 mt32 text-center" style="background: lightgrey;">
+ <h3>Status</h3>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- Inner left -->
+ <div class="col-xs-6" style="padding-right:7mm; height: 149mm; -webkit-transform:rotate(180deg); padding-top: 2mm;">
+ <span t-field="o.event_id.badge_back"/>
+ </div>
+ </div>
+
+ <div class="row">
+ <!-- Back -->
+ <div class="col-xs-6 text-center" style="padding-right:7mm; border-top:1px dashed black; height: 148mm;">
+ <span t-field="o.event_id.badge_innerleft"/>
+ </div>
+
+ <!-- Front -->
+ <div class="col-xs-6 text-center" style="border-left:1px dashed black; border-top:1px dashed black; height: 148mm; text-center">
+ <span t-field="o.event_id.badge_innerright"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </t>
+ </template>
+ </data>
+</openerp>