diff --git a/caldav_sync/__manifest__.py b/caldav_sync/__manifest__.py index 6a75a66..c3bb355 100644 --- a/caldav_sync/__manifest__.py +++ b/caldav_sync/__manifest__.py @@ -17,6 +17,9 @@ """, 'author': 'Your Name', 'depends': ['base', 'calendar'], + 'external_dependencies': { + 'python': ['caldav'], + }, 'data': [ 'data/caldav_sync_data.xml', ], diff --git a/caldav_sync/controllers/main.py b/caldav_sync/controllers/main.py index bf16280..97ca3c1 100644 --- a/caldav_sync/controllers/main.py +++ b/caldav_sync/controllers/main.py @@ -7,8 +7,8 @@ from datetime import datetime _logger = logging.getLogger(__name__) -class CaldavController(http.Controller): +class CaldavController(http.Controller): @http.route('/caldav_sync/sync', type='json', auth='user') def sync(self, **kwargs): # Fetch user credentials and server settings from Odoo @@ -30,7 +30,8 @@ class CaldavController(http.Controller): return {'status': 'success', 'message': 'Synchronization completed'} - def sync_event(self, ical): + @staticmethod + def sync_event(ical): event = ical.subcomponents[0] uid = event['UID'] start = event['DTSTART'].dt