Browse Source

export participants

enregistrements

afficher prix sur page evt
dev-rcn
root 3 years ago
parent
commit
7e08a3d33b
5 changed files with 26 additions and 15 deletions
  1. +3
    -1
      models/booking_event.py
  2. +1
    -1
      models/event.py
  3. +3
    -1
      views/booking_event_registration.xml
  4. +1
    -0
      views/event.xml
  5. +18
    -12
      views/event_templates_page_registration.xml

+ 3
- 1
models/booking_event.py View File

@ -114,10 +114,12 @@ class BookingEvent(models.Model):
def generate_csv_booking_registrants(self,id):
booking=self.env['event.event'].search([('id','=',int(id))])
header_ligne='Nom & Prénom;Rôle;Options;Montant retraite;Adhésion;Autre options;Montant à payer;Statut commande;Type de paiement;Règlement\n'
header_ligne='Nom & Prénom;Genre;Rôle;Options;Montant retraite;Adhésion;Autre options;Montant à payer;Statut commande;Type de paiement;Règlement\n'
csv_lines=''
for reg in booking.registration_ids:
name=str(reg.name)
if reg.firstname:name=name+' '+str(reg.firstname)
gender=str(reg.gender)
role=self._compute_member_status(reg)
options=self._compute_invoice_options(reg)
booking_amount=self._compute_booking_amount(reg)


+ 1
- 1
models/event.py View File

@ -420,7 +420,7 @@ class KalachakraEvent(models.Model):
)
teaching_html_content_records=fields.Html('teaching content records')
teaching_html_content_records_published=fields.Boolean('publish html content')
def add_registration_to_mailing_list(self):
registrants=self.env['event.registration'].search([('event_id','=',int(self.id))])
if registrants:


+ 3
- 1
views/booking_event_registration.xml View File

@ -233,7 +233,9 @@
<field name="model">event.registration</field>
<field name="inherit_id" ref="event.view_event_registration_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="gender" invisible="context.get('booking_view')==False"/>
</xpath>
<xpath expr="//field[@name='event_ticket_id']" position="replace">
<field name="online" invisible="context.get('booking_view')==True"/>
<!-- <field name="invoice_options" invisible="context.get('booking_view')==False"/>


+ 1
- 0
views/event.xml View File

@ -174,6 +174,7 @@
<page string="Media records" name="Media records">
<group style="width:100%%">
<field name="teaching_html_content_records_published"/>
<field name="teaching_html_content_records"/>
<field name="teaching_day_ids">
<tree>


+ 18
- 12
views/event_templates_page_registration.xml View File

@ -49,9 +49,10 @@
<template id="kalachakra.event_description_full" inherit_id="website_event.event_description_full">
<xpath expr="//span[@itemprop='description']" position="before">
<h6>Media sessions recording :</h6>
<t t-if="event.teaching_day_ids">
<h6 style="background-color: orange;">Enregistrements disponibles :</h6>
<t t-foreach="event.teaching_day_ids.sorted(key=lambda r: r.sequence)" t-as="t_day">
@ -118,12 +119,16 @@
</t>
</t>
<t t-if="event.teaching_html_content_records">
<t t-if="event.teaching_html_content_records_published">
<h6 style="background-color: orange;">Enregistrements disponibles :</h6>
<div>
<t t-raw="event.teaching_html_content_records"/>
</div>
</t>
<br></br><br></br>
</t>
@ -166,15 +171,16 @@
<span class="kala_evt1" t-field="event.with_context(tz=event.date_tz).date_end" t-options="{'time_only': 'true', 'format': 'short'}"/>
</t>
<!-- <div class="dropdown">
<i class="fa fa-calendar mr-1"/>
<a href="#" role="button" data-toggle="dropdown">Add to Calendar</a>
<div class="dropdown-menu">
<a t-att-href="iCal_url" class="dropdown-item">iCal/Outlook</a>
<a t-att-href="google_url" class="dropdown-item" target="_blank">Google</a>
</div>
</div>-->
<t t-if="not event.booking_event">
<t t-if="not event.free_participation">
<br></br>
<br></br>
<h5 style="color: rgb(255, 0, 0)">Participation :</h5>
<h6><font style="color: rgb(255, 0, 0);font-size: 14px;">Non adhérent : <span t-esc="int(event.participation_standard_price)"/></font></h6>
<h6><font style="color: rgb(255, 0, 0);font-size: 14px;">Adhérent : <span t-esc="int(event.participation_member_price)"/></font></h6>
<h6><font style="color: rgb(255, 0, 0);font-size: 14px;">Membre soutien : <span t-esc="int(event.participation_super_member_price)"/></font></h6>
</t>
</t>
</t>
</div>


Loading…
Cancel
Save