From b62d4fb20510b5404fc030dbf066c3614f229626 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 11 Jul 2022 14:36:07 +0200 Subject: [PATCH] corrections --- models/__init__.py | 2 +- models/event.py | 46 ++++++++++----------- views/event.xml | 4 +- views/event_templates_list.xml | 7 +++- views/event_templates_page_registration.xml | 7 +++- 5 files changed, 35 insertions(+), 31 deletions(-) diff --git a/models/__init__.py b/models/__init__.py index ea90c66..d9b090d 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -16,7 +16,7 @@ from . import booking_room from . import booking_questionnaire from . import booking_event_registration from . import booking_donation -from . import booking_sale_order +#from . import booking_sale_order from . import event_media_link from . import mailing_list #from . import account diff --git a/models/event.py b/models/event.py index f65d020..b1b4829 100644 --- a/models/event.py +++ b/models/event.py @@ -88,17 +88,24 @@ class KalachakraEvent(models.Model): child_event.name=self.name child_event.recurring_event_newsletter_id=self.recurring_event_newsletter_id 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.seats_limited=self.seats_limited 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.address_id=self.address_id + + child_event.online_event=self.online_event child_event.online_link=self.online_link child_event.online_id=self.online_id 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: if e.calendar_id and e.calendar_event_id: 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() @@ -167,21 +177,21 @@ class KalachakraEvent(models.Model): vals['event_logo']=rec.event_logo vals['is_published']=True 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_member_price']=rec.participation_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_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_link']=rec.online_link - vals['online_id']=rec.online_id + vals['online_id']=int(rec.online_id) 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 @@ -242,21 +252,7 @@ class KalachakraEvent(models.Model): 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)] - - + diff --git a/views/event.xml b/views/event.xml index c3e4877..08bf507 100644 --- a/views/event.xml +++ b/views/event.xml @@ -66,7 +66,7 @@ - + diff --git a/views/event_templates_list.xml b/views/event_templates_list.xml index 5dbf272..3f76855 100644 --- a/views/event_templates_list.xml +++ b/views/event_templates_list.xml @@ -92,7 +92,7 @@
Non adhérent : Adhérent : -
Soutien : +
membre soutien : @@ -130,7 +130,7 @@
Non adhérent : Adhérent : -
Soutien : +
Membre soutien : @@ -168,6 +168,9 @@ + +
+ diff --git a/views/event_templates_page_registration.xml b/views/event_templates_page_registration.xml index 3546ec8..8807fb2 100644 --- a/views/event_templates_page_registration.xml +++ b/views/event_templates_page_registration.xml @@ -25,7 +25,7 @@ - @@ -34,6 +34,9 @@ + + + @@ -56,5 +59,7 @@ + + \ No newline at end of file