Posts

Showing posts from 2021

Insert Event in Google Calendar for dynamic dates Using OAuth in Odoo 12.0/Python [complete example code]

I couldn't find any direct documentation when I was working with the insert event functionality to the google calendar. So, I have given the code that was developed for my requirement in python. Hope, it may help to someone who needs more or less the same functionality. Before starting with the code ,  you have to create account in google cloud. Complete python code class CalendarEvents(http.Controller): SCOPES = [ 'https://www.googleapis.com/auth/calendar' ] odoo.http.HttpRequest.session.__setattr__( 'credentials' , { 'token' : 'None' , 'refresh_token' : 'None' , 'token_uri' : "None" , 'client_id' : "None" , 'client_secret' : "None" , 'scopes' :SCOPES}) def get_client_config(self): baseroot = request.env[ 'ir.config_parameter' ].sudo().get_param( 'web.bas...