diff --git a/models/event.py b/models/event.py
index b1b4829..48a15a4 100644
--- a/models/event.py
+++ b/models/event.py
@@ -3,6 +3,7 @@ from odoo import models, fields, api,_
from odoo.exceptions import UserError, ValidationError,Warning
from psycopg2 import sql, DatabaseError
from pytz import timezone
+from odoo.addons.http_routing.models.ir_http import slugify
from werkzeug import utils
@@ -189,7 +190,7 @@ class KalachakraEvent(models.Model):
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']=int(rec.online_id)
+ vals['online_id']=rec.online_id
vals['online_password']=rec.online_password
vals['parent_event_id']=int(rec.id)
vals['cover_properties']=rec.cover_properties
@@ -241,7 +242,7 @@ class KalachakraEvent(models.Model):
if prd.price_per=='day':
price=option.list_price*self.duration
if prd.price_per=='night':
- price=option.list_price*self.duration-1
+ price=option.list_price*(self.duration-1)
vals['event_id']=self.id
vals['booking_option_id']=option.id
@@ -296,10 +297,11 @@ class KalachakraEvent(models.Model):
date_param=self.date_begin.strftime('%Y-%m-%d')+'-'+self.date_end.strftime('%Y-%m-%d')+'-'+str(self.id)
else:
date_param=self.date_begin.strftime('%Y-%m-%d')+'-'+str(self.id)
-
- name_param=self.name.replace(' ','-')
+
+ name_event_slug=slugify(self.name,max_length=1024, path=True)
+ name_param=name_event_slug.replace(' ','-')
name_param=name_param.replace('\'','-')
- description='Click here to register'
+ description='cliquer ici pour s\'inscrire'
#str(self.date_begin.year())+'-'+str(self.date_begin.month())+'-'+self.date_begin.day()
body={"summary": self.name,