|
|
@ -96,7 +96,7 @@ class Kalachakra_PortalAccount(CustomerPortal): |
|
|
|
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)] |
|
|
|
|
|
|
|
# count for pager |
|
|
|
invoice_count = request.env['account.move'].search_count(domain) |
|
|
|
invoice_count = request.env['account.move'].sudo().search_count(domain) |
|
|
|
|
|
|
|
# pager |
|
|
|
pager = portal_pager( |
|
|
@ -107,7 +107,7 @@ class Kalachakra_PortalAccount(CustomerPortal): |
|
|
|
step=self._items_per_page |
|
|
|
) |
|
|
|
# content according to pager and archive selected |
|
|
|
invoices = request.env['account.move'].search(domain, order=order, limit=self._items_per_page, offset=pager['offset']) |
|
|
|
invoices = request.env['account.move'].sudo().search(domain, order=order, limit=self._items_per_page, offset=pager['offset']) |
|
|
|
|
|
|
|
request.session['my_invoices_history'] = invoices.ids[:100] |
|
|
|
|
|
|
@ -627,7 +627,8 @@ 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' |
|
|
|
#data['form_action']='step2' |
|
|
|
data['form_action']='contactform' |
|
|
|
if event.headphone_option :data['form_action']='step1b' |
|
|
|
|
|
|
|
request.session['status']=partner.member_status |
|
|
@ -635,7 +636,7 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing): |
|
|
|
|
|
|
|
@http.route(['/event/registration/contactform'], type='http', auth='user', website=True, sitemap=False,csrf=False) |
|
|
|
#def event_registration_contactform(self,event_id,*args,**kw): |
|
|
|
def event_registration_contactform(self,*args,**kw): |
|
|
|
def event_registration_contactform(self,event_id,*args,**kw): |
|
|
|
data={} |
|
|
|
#contact lié à l'utilisateur |
|
|
|
|
|
|
@ -644,10 +645,16 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing): |
|
|
|
user=request.env['res.users'].search([('id','=',int(userid))]) |
|
|
|
partner=request.env['res.partner'].sudo().search([('id','=',int(user.partner_id))]) |
|
|
|
data['partner']=partner |
|
|
|
country=request.env['res.country'].sudo().search([]) |
|
|
|
country_france=request.env['res.country'].sudo().search([('name','=','France')]) |
|
|
|
data['country_france_id']=int(country_france.id) |
|
|
|
data['countries']=country |
|
|
|
data['country_id']=int(partner.country_id) |
|
|
|
data['form_action']='step2' |
|
|
|
#évenement |
|
|
|
# event=request.env['event.event'].sudo().search([('id','=',int(event_id))]) |
|
|
|
# request.session['event_id']=int(event_id) |
|
|
|
#data['event']=event |
|
|
|
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_contactform',data) |
|
|
|
|
|
|
@ -708,7 +715,7 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing): |
|
|
|
data['membership_and_participation_amount']=str(int(data['membership_amount'])+int(event.participation_member_price)) +' ('+str(int(data['membership_amount']))+'+'+str(int(event.participation_member_price))+')' |
|
|
|
|
|
|
|
#enregistrement de l'inscription si pas déjà inscrit : |
|
|
|
res=request.env['event.registration'].sudo().search([('event_id','=',int(request.session['event_id'])),('partner_id','=',int(request.session['partner_id']))],limit=1) |
|
|
|
res=request.env['event.registration'].sudo().search([('event_id','=',int(request.session['event_id'])),('partner_id','=',int(request.session['partner_id'])),('state','!=','cancel')],limit=1) |
|
|
|
data['already_registered']=True |
|
|
|
data['payment_status']=res.payment_status |
|
|
|
|
|
|
@ -743,7 +750,23 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing): |
|
|
|
res.headphone=True |
|
|
|
request.session['res_id']=res.id |
|
|
|
|
|
|
|
#mise à jour des informations personnelles |
|
|
|
|
|
|
|
partner.name=post.get('name') |
|
|
|
partner.firstname=post.get('firstname') |
|
|
|
partner.street=post.get('street') |
|
|
|
partner.street2=post.get('street2') |
|
|
|
partner.zip=post.get('zip') |
|
|
|
partner.city=post.get('city') |
|
|
|
partner.phone=post.get('phone') |
|
|
|
partner.mobile=post.get('mobile') |
|
|
|
if post.get('birthday_date')!='': |
|
|
|
bd=post.get('birthday_date').split('/' |
|
|
|
) |
|
|
|
partner.birthday_date=bd[2]+'-'+bd[1]+'-'+bd[0] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return http.request.render('kalachakra.registration_step2',data) |
|
|
|
|
|
|
|
@http.route(['/kalachakra/onthespotpayment'], type='http', auth='public', website=True, sitemap=False,csrf=False) |
|
|
|