Browse Source

corrections

dev-rcn
root 3 years ago
parent
commit
b62d4fb205
5 changed files with 35 additions and 31 deletions
  1. +1
    -1
      models/__init__.py
  2. +21
    -25
      models/event.py
  3. +2
    -2
      views/event.xml
  4. +5
    -2
      views/event_templates_list.xml
  5. +6
    -1
      views/event_templates_page_registration.xml

+ 1
- 1
models/__init__.py View File

@ -16,7 +16,7 @@ from . import booking_room
from . import booking_questionnaire from . import booking_questionnaire
from . import booking_event_registration from . import booking_event_registration
from . import booking_donation from . import booking_donation
from . import booking_sale_order
#from . import booking_sale_order
from . import event_media_link from . import event_media_link
from . import mailing_list from . import mailing_list
#from . import account #from . import account


+ 21
- 25
models/event.py View File

@ -88,17 +88,24 @@ class KalachakraEvent(models.Model):
child_event.name=self.name child_event.name=self.name
child_event.recurring_event_newsletter_id=self.recurring_event_newsletter_id child_event.recurring_event_newsletter_id=self.recurring_event_newsletter_id
child_event.find_out_more_link=self.find_out_more_link child_event.find_out_more_link=self.find_out_more_link
child_event.online_event=self.online_event
child_event.auto_confirm=self.auto_confirm child_event.auto_confirm=self.auto_confirm
child_event.seats_limited=self.seats_limited child_event.seats_limited=self.seats_limited
child_event.seats_max=self.seats_max child_event.seats_max=self.seats_max
child_event.organizer_id=self.organizer_id
if vals.get('organizer_id'):child_event.organizer_id=self.organizer_id
child_event.user_id=self.user_id child_event.user_id=self.user_id
child_event.address_id=self.address_id child_event.address_id=self.address_id
child_event.online_event=self.online_event
child_event.online_link=self.online_link child_event.online_link=self.online_link
child_event.online_id=self.online_id child_event.online_id=self.online_id
child_event.online_password=self.online_password child_event.online_password=self.online_password
child_event.event_logo=self.event_logo
child_event.cover_properties=self.cover_properties
child_event.tag_ids=self.tag_ids
child_event.description=self.description
child_event.is_published=self.is_published
@ -119,6 +126,9 @@ class KalachakraEvent(models.Model):
for e in evt: for e in evt:
if e.calendar_id and e.calendar_event_id: if e.calendar_id and e.calendar_event_id:
e.remove_event_from_google_agenda() e.remove_event_from_google_agenda()
# reg=self.env['event.registration'].search([('event_id','=', int(e.id))])
# if reg:
# return str(e.date_begin)
e.unlink() e.unlink()
@ -167,21 +177,21 @@ class KalachakraEvent(models.Model):
vals['event_logo']=rec.event_logo vals['event_logo']=rec.event_logo
vals['is_published']=True vals['is_published']=True
vals['free_participation']=rec.free_participation vals['free_participation']=rec.free_participation
vals['participation_product_id']=rec.participation_product_id
vals['participation_product_id']=int(rec.participation_product_id)
vals['participation_standard_price']=rec.participation_standard_price vals['participation_standard_price']=rec.participation_standard_price
vals['participation_member_price']=rec.participation_member_price vals['participation_member_price']=rec.participation_member_price
vals['participation_super_member_price']=rec.participation_super_member_price vals['participation_super_member_price']=rec.participation_super_member_price
vals['subscription_product_id']=rec.subscription_product_id
vals['subscription_standard_price']=rec.subscription_standard_price
vals['subscription_member_price']=rec.subscription_member_price
vals['subscription_super_member_price']=rec.subscription_super_member_price
vals['subscription_product_id']=int(rec.subscription_product_id)
# vals['subscription_standard_price']=rec.subscription_standard_price
# vals['subscription_member_price']=rec.subscription_member_price
# vals['subscription_super_member_price']=rec.subscription_super_member_price
vals['recurring_event']=rec.recurring_event vals['recurring_event']=rec.recurring_event
vals['recurring_event_newsletter_id']=rec.recurring_event_newsletter_id
vals['recurring_event_newsletter_id']=int(rec.recurring_event_newsletter_id)
vals['online_event']=rec.online_event vals['online_event']=rec.online_event
vals['online_link']=rec.online_link vals['online_link']=rec.online_link
vals['online_id']=rec.online_id
vals['online_id']=int(rec.online_id)
vals['online_password']=rec.online_password vals['online_password']=rec.online_password
vals['parent_event_id']=rec.id
vals['parent_event_id']=int(rec.id)
vals['cover_properties']=rec.cover_properties vals['cover_properties']=rec.cover_properties
@ -242,21 +252,7 @@ class KalachakraEvent(models.Model):
self.booking_option_ids = [(0, 0, vals)] self.booking_option_ids = [(0, 0, vals)]
# if self.event_type_id.booking_questionnaire_id:
# #on supprime les question existantes:
# self.question_ids=False
# questions=self.env['booking.question'].search([('questionnaire_id','=',int(self.event_type_id.booking_questionnaire_id))])
# #on rappatrie les question
# for question in questions:
# vals={}
# vals['event_id']=self.id
# vals['sequence']=question.sequence
# vals['question']=question.question
# self.question_ids = [(0, 0, vals)]


+ 2
- 2
views/event.xml View File

@ -66,7 +66,7 @@
</group> </group>
</page> </page>
<page string="Subscriptions" name="Subscriptions" attrs="{'invisible':['|',('free_participation','=',True),('booking_event','=',True)]}">
<!-- <page string="Subscriptions" name="Subscriptions" attrs="{'invisible':['|',('free_participation','=',True),('booking_event','=',True)]}">
<group style="width:40%%"> <group style="width:40%%">
<field name="subscription_product_id"/> <field name="subscription_product_id"/>
@ -75,7 +75,7 @@
<field name="subscription_super_member_price"/> <field name="subscription_super_member_price"/>
</group> </group>
</page>
</page> -->
<page string="Online options" name="Online" attrs="{'invisible':['|',('online_event','=',False),('booking_event','=',True)]}"> <page string="Online options" name="Online" attrs="{'invisible':['|',('online_event','=',False),('booking_event','=',True)]}">
<group style="width:80%%"> <group style="width:80%%">


+ 5
- 2
views/event_templates_list.xml View File

@ -92,7 +92,7 @@
<br/> <br/>
<font style="color: rgb(255, 0, 0); font-size: 14px;">Non adhérent : <span t-esc="int(event.booking_price)"/></font> <font style="color: rgb(255, 0, 0); font-size: 14px;">Non adhérent : <span t-esc="int(event.booking_price)"/></font>
<font style="color: rgb(255, 0, 0); font-size: 14px;"> Adhérent : <span t-esc="int(event.booking_member_price)"/></font> <font style="color: rgb(255, 0, 0); font-size: 14px;"> Adhérent : <span t-esc="int(event.booking_member_price)"/></font>
<br/><font style="color: rgb(255, 0, 0); font-size: 14px;">Soutien : <span t-esc="int(event.booking_super_member_price)"/></font>
<br/><font style="color: rgb(255, 0, 0); font-size: 14px;">membre soutien : <span t-esc="int(event.booking_super_member_price)"/></font>
</t> </t>
@ -130,7 +130,7 @@
<br/> <br/>
<h7><font style="color: rgb(255, 0, 0);font-size: 14px;">Non adhérent : <span t-esc="int(event.participation_standard_price)"/></font></h7> <h7><font style="color: rgb(255, 0, 0);font-size: 14px;">Non adhérent : <span t-esc="int(event.participation_standard_price)"/></font></h7>
<h7><font style="color: rgb(255, 0, 0);font-size: 14px;">Adhérent : <span t-esc="int(event.participation_member_price)"/></font></h7> <h7><font style="color: rgb(255, 0, 0);font-size: 14px;">Adhérent : <span t-esc="int(event.participation_member_price)"/></font></h7>
<br/><h7><font style="color: rgb(255, 0, 0);font-size: 14px;">Soutien : <span t-esc="int(event.participation_super_member_price)"/></font></h7>
<br/><h7><font style="color: rgb(255, 0, 0);font-size: 14px;">Membre soutien : <span t-esc="int(event.participation_super_member_price)"/></font></h7>
</t> </t>
@ -168,6 +168,9 @@
</t> </t>
</t> </t>
</xpath> </xpath>
<xpath expr="//div[@itemprop='location']" position="replace">
<div itemprop="location" t-field="event.address_id.city"/>
</xpath>


+ 6
- 1
views/event_templates_page_registration.xml View File

@ -25,7 +25,7 @@
</xpath> </xpath>
<!-- on bloque la qte à 1 --> <!-- on bloque la qte à 1 -->
<xpath expr="//select[@class='w-auto custom-select']" position="replace"> <xpath expr="//select[@class='w-auto custom-select']" position="replace">
<select t-att-name="'nb_register-%s' % (tickets.id if tickets else 0)" class="w-auto custom-select">
<select style='display:none;' t-att-name="'nb_register-%s' % (tickets.id if tickets else 0)" class="w-auto custom-select">
<t t-set="seats_max_ticket" t-value="(not tickets or not tickets.seats_limited or tickets.seats_available &gt; 9) and 10 or tickets.seats_available + 1"/> <t t-set="seats_max_ticket" t-value="(not tickets or not tickets.seats_limited or tickets.seats_available &gt; 9) and 10 or tickets.seats_available + 1"/>
<t t-set="seats_max_event" t-value="(not event.seats_limited or event.seats_available &gt; 9) and 10 or event.seats_available + 1"/> <t t-set="seats_max_event" t-value="(not event.seats_limited or event.seats_available &gt; 9) and 10 or event.seats_available + 1"/>
<t t-set="seats_max" t-value="min(seats_max_ticket, seats_max_event) if tickets else seats_max_event"/> <t t-set="seats_max" t-value="min(seats_max_ticket, seats_max_event) if tickets else seats_max_event"/>
@ -34,6 +34,9 @@
</select> </select>
</xpath> </xpath>
<xpath expr="//span[@class='text-dark font-weight-bold align-middle pr-2']" position="replace">
</xpath>
</template> </template>
@ -56,5 +59,7 @@
</t> </t>
</xpath> </xpath>
<xpath expr="//div[4][@class='o_wevent_sidebar_block']" position="replace">
</xpath>
</template> </template>
</odoo> </odoo>

Loading…
Cancel
Save