Browse Source

adhesion soutien

dev-rcn
root 3 years ago
parent
commit
846fce4eff
7 changed files with 54 additions and 8 deletions
  1. +10
    -0
      controllers/kalachakra.py
  2. +1
    -0
      models/event.py
  3. +6
    -0
      static/js/kalachakra.js
  4. +1
    -1
      views/event.xml
  5. +6
    -1
      views/event_templates_list.xml
  6. +6
    -6
      views/website_event_registration.xml
  7. +24
    -0
      views/website_participation.xml

+ 10
- 0
controllers/kalachakra.py View File

@ -345,7 +345,17 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing):
#membership product
data['products']=p
if type=='super_membership':
request.session['kalachakra_transaction']='super_membership'
data['kalachakra_transaction']='super_membership'
data['title']='Become a super member'
p=request.env['product.product'].sudo().search([('super_membership_product','=',True)],limit=1)
if not p: raise UserError(_('No membership product, please add one'))
data['amount']=p.list_price
#super membership product
data['products']=p
userid=request.env.context.get('uid')


+ 1
- 0
models/event.py View File

@ -53,6 +53,7 @@ class KalachakraEvent(models.Model):
recurring_event=fields.Boolean('Recurring event')
recurring_event_newsletter_id=fields.Many2one('mailing.list',string='Recurring event Newsletter')
online_event=fields.Boolean('Online event')
onthespot_event=fields.Boolean('Online event')
online_link=fields.Char('link')
online_id=fields.Char('id')
online_password=fields.Char('password')


+ 6
- 0
static/js/kalachakra.js View File

@ -31,6 +31,12 @@ odoo.define('kalachakra.main', function (require) {
$( "#form" ).submit();
});
$( "#make_donation_btn" ).click(function() {
$('#form').attr('action', '/kalachakra/participation?type=donation');
$( "#form" ).submit();
});
$( "#pay_on_the_spot_btn" ).click(function() {


+ 1
- 1
views/event.xml View File

@ -82,7 +82,7 @@
<field name="online_link" attrs="{'required': [('online_event','=', True)]}"/>
<field name="online_id"/>
<field name="online_password" attrs="{'required': [('online_event','=', True)]}"/>
<field name="online_password"/>
</group>
</page>


+ 6
- 1
views/event_templates_list.xml View File

@ -49,7 +49,12 @@
<template id="kalachakra.events_list" inherit_id="website_event.events_list">
<xpath expr="//h5[1]" position="replace">
<h5 t-attf-class="card-title mt-2 mb-0 #{(not event.website_published) and 'text-danger'}">
<span t-field="event.name" itemprop="name"/>
</h5>
</xpath>
<xpath expr="//time[@itemprop='startDate']" position="after">
<t t-if="event.booking_event">


+ 6
- 6
views/website_event_registration.xml View File

@ -18,10 +18,10 @@
<b><h7 style="display: inline">Registering to : </h7><h7 style="display: inline" t-esc="event.name"></h7></b>
<br></br>
<t t-if="event.duration==0">
<h7>From <span t-field="event.date_begin" t-options='{"format": "dd/MM/yyyy hh:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "hh:mm"}'/> </h7>
<h7>From <span t-field="event.date_begin" t-options='{"format": "dd/MM/yyyy HH:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "HH:mm"}'/> </h7>
</t>
<t t-if="event.duration>0">
<h7>From <span t-field="event.date_begin" t-options='{"format": "dd/MM/yyyy hh:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "dd/MM/yyyy hh:mm"}'/> </h7>
<h7>From <span t-field="event.date_begin" t-options='{"format": "dd/MM/yyyy HH:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "dd/MM/yyyy HH:mm"}'/> </h7>
</t>
<br></br>
<h7> Your status :
@ -87,7 +87,7 @@
<b><h7 style="display: inline">Registering to : </h7><h7 style="display: inline" t-esc="event.name"></h7></b>
<br></br>
<t t-if="event.duration==0">
<h7>From <span t-field="event.date_begin" t-options='{"format": "dd/MM/yyyy hh:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "hh:mm"}'/> </h7>
<h7>From <span t-field="event.date_begin" t-options='{"format": "dd/MM/yyyy HH:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "HH:mm"}'/> </h7>
</t>
<t t-if="event.duration>0">
<h7>From <span t-field="event.date_begin" t-options='{"format": "dd/MM/yyyy HH:mm"}'/> to <span t-field="event.date_end" t-options='{"format": "dd/MM/yyyy HH:mm"}'/> </h7>
@ -107,7 +107,7 @@
<h7>You will soon receive a confirmation email.</h7>
</t>
<t t-if="already_registered">
<h7>You are already registered</h7>
<h7><b>You are already registered</b></h7>
<t t-if="payment_status=='paid'">
<br></br>
<h7>You have already paid</h7>
@ -138,7 +138,7 @@
<h7> The participation is free.</h7>
<br></br>
<br></br>
<h7>If you want to make a donation, click here : </h7><button type="submit" class="btn btn-primary" >Make a donation</button>
<h7>If you want to make a donation, click here : </h7><button id="make_donation_btn" type="submit" class="btn btn-primary" >Make a donation</button>
<br></br>
<br></br>
@ -165,7 +165,7 @@
<br></br>
<t t-if="partner.member_status=='not member'">
<h7> If you want to become a member for one year and pay the participation,</h7>
<h7> If you want to become a member for one year and pay the participation, </h7>
<br></br>
<h7>the amount is : </h7><b><h7 t-esc="membership_and_participation_amount"></h7><h7></h7></b>
<br></br>


+ 24
- 0
views/website_participation.xml View File

@ -20,6 +20,13 @@
</t>
<t t-if="title=='Become a member'">
<h6 class="o_page_header mt16 mb4">Become a member :</h6>
</t>
<t t-if="title=='Become a super member'">
<h6 class="o_page_header mt16 mb4">Become a super member :</h6>
<h6>Free access to lessons in Paris (except visits
events where membership participation will be applied)<br></br>and
reduced participation for pensions in the Sarthe.</h6>
</t>
<div id="div_email" class="form-group col-lg-4">
@ -131,6 +138,23 @@
<t t-if="kalachakra_transaction=='membership'">
<input type="number" id="amount_id" name="amount" readonly="readonly" class="form-control " t-att-value="amount"/>
</t>
<t t-if="kalachakra_transaction=='super_membership'">
<div class="btn-group btn-group-justified" role="group">
<button type="button" class="list-group-item">40 €</button>
<button type="button" class="list-group-item">60 €</button>
<button type="button" class="list-group-item">80 €</button>
<button type="button" class="list-group-item">100 €</button>
<button type="button" id="btn_autre" class="list-group-item">More</button>
</div>
<br></br>
<br></br>
<div class="col-lg-3 col-md-3">
<input type="number" id="amount_id" name="amount" class="form-control " t-att-value="amount"/>
</div>
</t>
</div>


Loading…
Cancel
Save