root 2 years ago
parent
commit
361149365a
2 changed files with 13 additions and 2 deletions
  1. +11
    -1
      models/event.py
  2. +2
    -1
      models/event_registration.py

+ 11
- 1
models/event.py View File

@ -172,7 +172,12 @@ class KalachakraEvent(models.Model):
def update_generated_events(self):
for rec in self:
hour_date_begin=rec.date_begin.hour
minute_date_begin=rec.date_begin.minute
hour_date_end=rec.date_end.hour
minute_date_end=rec.date_end.minute
evt=self.env['event.event'].search([('parent_event_id','=', rec.id)])
if evt:
for child_event in evt:
@ -181,6 +186,7 @@ class KalachakraEvent(models.Model):
for mail_id in rec.event_mail_ids:
vals={}
vals["notification_type"]=mail_id.notification_type
vals["template_id"]=int(mail_id.template_id)
vals["sms_template_id"]=int(mail_id.sms_template_id)
@ -196,6 +202,10 @@ class KalachakraEvent(models.Model):
#_logger.error(str(child_event.event_mail_ids))
#child_event.event_type_id=rec.event_type_id
child_event.date_begin=child_event.date_begin.replace(hour=hour_date_begin, minute=minute_date_begin)
child_event.date_end=child_event.date_end.replace(hour=hour_date_end, minute=minute_date_end)
child_event.recurring_event_newsletter_id=rec.recurring_event_newsletter_id
child_event.find_out_more_link=rec.find_out_more_link


+ 2
- 1
models/event_registration.py View File

@ -28,7 +28,8 @@ class EventRegistration(models.Model):
if rec.invoice_id.invoice_payments_widget:
payment_info=json.loads(rec.invoice_id.invoice_payments_widget)
if payment_info:
rec.date_payment= payment_info['content'][0]['date']
nb_payments=len(payment_info['content'])
rec.date_payment= payment_info['content'][nb_payments]['date']
else:
rec.date_payment=False


Loading…
Cancel
Save