|
|
@ -603,11 +603,29 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing): |
|
|
|
if data['status']=='not member':data['status']='non adhérent' |
|
|
|
if data['status']=='member':data['status']='adhérent' |
|
|
|
if data['status']=='super member':data['status']='adhérent de soutien' |
|
|
|
|
|
|
|
data['form_action']='step2' |
|
|
|
if event.headphone_option :data['form_action']='step1b' |
|
|
|
|
|
|
|
request.session['status']=partner.member_status |
|
|
|
return http.request.render('kalachakra.registration_step1',data) |
|
|
|
|
|
|
|
@http.route(['/event/registration/step1b'], type='http', auth='user', website=True, sitemap=False,csrf=False) |
|
|
|
def event_registration_step1b(self,event_id,*args,**kw): |
|
|
|
data={} |
|
|
|
#contact lié à l'utilisateur |
|
|
|
userid=request.env.context.get('uid') |
|
|
|
user=request.env['res.users'].search([('id','=',int(userid))]) |
|
|
|
partner=request.env['res.partner'].sudo().search([('id','=',int(user.partner_id))]) |
|
|
|
data['partner']=partner |
|
|
|
#évenement |
|
|
|
event=request.env['event.event'].sudo().search([('id','=',int(event_id))]) |
|
|
|
request.session['event_id']=int(event_id) |
|
|
|
data['event']=event |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return http.request.render('kalachakra.registration_step1b',data) |
|
|
|
|
|
|
|
|
|
|
|
@http.route(['/event/registration/step2'], type='http', auth='user', website=True, sitemap=False,csrf=False) |
|
|
|
def event_registration_step2(self,event_id,**post): |
|
|
@ -626,7 +644,10 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing): |
|
|
|
data['event']=event |
|
|
|
|
|
|
|
data['online']=False |
|
|
|
data['headphone']=False |
|
|
|
|
|
|
|
if post.get('headphone')=='yes':data['headphone']=True |
|
|
|
|
|
|
|
if event.online_event: |
|
|
|
if post.get('online')=='yes':data['online']=True |
|
|
|
if event.online_only:data['online']=True |
|
|
@ -656,6 +677,9 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing): |
|
|
|
vals={} |
|
|
|
vals['event_id']=request.session['event_id'] |
|
|
|
vals['partner_id']=request.session['partner_id'] |
|
|
|
if post.get('headphone')=='yes':vals['headphone']=True |
|
|
|
else:vals['headphone']=False |
|
|
|
|
|
|
|
if event.online_event: |
|
|
|
if post.get('online')=='yes':vals['online']=True |
|
|
|
else:vals['online']=False |
|
|
@ -670,6 +694,10 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing): |
|
|
|
membership=False |
|
|
|
invoice_id=request.env['event.registration'].sudo().action_generate_participation_invoice(int(res.id),'CB',membership) |
|
|
|
|
|
|
|
else: |
|
|
|
data['headphone']=True |
|
|
|
if post.get('headphone')=='yes':data['headphone']=True |
|
|
|
res.headphone=True |
|
|
|
request.session['res_id']=res.id |
|
|
|
|
|
|
|
|
|
|
|