Browse Source

divers

dev-rcn
root 3 years ago
parent
commit
6741e952ae
5 changed files with 22 additions and 8 deletions
  1. +4
    -4
      controllers/kalachakra.py
  2. +1
    -1
      models/event_registration.py
  3. +11
    -0
      views/mailing_list.xml
  4. +4
    -2
      views/website_event_registration.xml
  5. +2
    -1
      views/website_participation.xml

+ 4
- 4
controllers/kalachakra.py View File

@ -317,9 +317,9 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing):
request.session['kalachakra_transaction']='donation'
data['kalachakra_transaction']='donation'
data['title']='make donation'
data['amount']=10
data['amount']=0
#donation product
data['products']=request.env['product.product'].sudo().search([('donation','=',True)])
data['products']=request.env['product.product'].sudo().search([('donation','=',True),('booking_option_product','=',False)])
if type=='membership':
@ -490,9 +490,9 @@ class kalachakra_event(WebsiteEventController,PaymentProcessing):
data={}
if request.session['kalachakra_transaction']=='donation':
data['submit_txt']='Donate now'
data['submit_txt']='Faire un don'
if request.session['kalachakra_transaction']=='membership':
data['submit_txt']='Pay now'
data['submit_txt']='Régler maintenant'
data['success_url']='/kalachakra/payment/success'
data['error_url']='/kalachakra/payment/error'


+ 1
- 1
models/event_registration.py View File

@ -56,7 +56,7 @@ class EventRegistration(models.Model):
else:
#si le contact existe, si la liste de diffusion n'est pas lié au contact, on l'ajoute
if not reg.event_id.recurring_event_newsletter_id in mailing_contact.list_ids:
mailing_contact.sudo().write({'list_ids':[(4,int(event.recurring_event_newsletter_id))]})
mailing_contact.sudo().write({'list_ids':[(4,int(reg.event_id.recurring_event_newsletter_id))]})
#inscription à la newsletter générale
mailing_list=self.env['mailing.list'].sudo().search([('name','=','Newsletter '+self.env.company.name)])


+ 11
- 0
views/mailing_list.xml View File

@ -15,6 +15,17 @@
<field name="id_sendinblue_list"/>
</xpath>
</field>
</record>
<record id="kalachakra_mailing_list_view_tree" model="ir.ui.view">
<field name="name">mailing_list.view.tree.inherit.kalachakra</field>
<field name="model">mailing.list</field>
<field name="inherit_id" ref="mass_mailing.mailing_list_view_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="id_sendinblue_list"/>
</xpath>
</field>
</record>
</odoo>

+ 4
- 2
views/website_event_registration.xml View File

@ -186,7 +186,7 @@
</t>
</t>
<br></br>
<t t-if="partner.member_status=='not member'">
<!-- <t t-if="partner.member_status=='not member'">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class=" col-sm-auto s_website_form_label " for="pm84usjk8cf">
<span class="s_website_form_label_content">To stay informed I subscribe to the newsletter of the center</span>
@ -195,7 +195,7 @@
<input type="checkbox" value="Yes" checked="checked" class="s_website_form_input" name="newsletter" required="1" id="pm84usjk8cf"/>
</div>
</div>
</t>
</t> -->
</t>
<br></br>
<br></br>
@ -214,6 +214,8 @@
<div class="container-fluid">
<h6>Thank you for your registration !</h6>
<a href="/" class="ml-4 btn btn-secondary">back Home</a>
<br></br>
<br></br>
</div>
</t>


+ 2
- 1
views/website_participation.xml View File

@ -17,6 +17,7 @@
<form id="form" action="payment_choice" method="post" class="form js_website_submit_form">
<t t-if="title=='make donation'">
<h6 class="mt16 mb4">Make donation :</h6>
<h6>The Kalachakra Center thanks you for your donation.<br></br>We invite you to fill in the following fields :</h6>
</t>
<t t-if="title=='Become a member'">
<h6 class="o_page_header mt16 mb4">Become a member :</h6>
@ -152,7 +153,7 @@ reduced participation for pensions in the Sarthe.</h6>
<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"/>
<input type="number" id="amount_id" name="amount" class="form-control "/>
</div>
</t>


Loading…
Cancel
Save