Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

I have problem in integrate google calendar with Odoo

Avatar
odoo
2 Comments
Avatar
Discard
Avatar
odoo
-

I have same problem. Do you have any idea

Avatar
odoo
-

Neither helped me. 

4 Answers
0
Avatar
odoo
Best Answer

Hi,

I have successfully connected by following the provided documentation.. 

https://www.odoo.com/documentation/17.0/applications/productivity/calendar/google.html


Avatar
Discard
0
Avatar
odoo
Best Answer

Answers like the ones on this thread really annoy me!


The people at Odoo and Cybrosis don't give us any credit at all for knowing what we're talking about. They don't even try to understand the issue. They just send us a link to an article as if we haven't already read and followed it a thousand times. It's an extremely dismissive approach.


To the original poster, the issue stems from a bug in Odoo's code. The code uses an HTTP request to get your website's URL, but this function relies on a Werkzeug variable, and it completely ignores the web.base.url parameter that you've set in Odoo's settings. If you're running Odoo behind a proxy, the resulting URL will always be wrong.


I corrected this error by rewriting the code to use the web.base.url parameter as a means of retrieving the site's URL, thus bypassing Werkzeug completely. Here's an example of the code I used:


request.env['ir.config_parameter'].sudo().get_param('web.base.url')


I had exactly the same issue as you when trying to set up the Google login for my site and I was able to fix it with this code. Please note that the function MUST be run as sudo. If not, you'll get "403 - access denied" errors".


My advice to you is to is this:


  1. search the Odoo repository on GitHub for references to "base_URL".

  2. Where they appear in files relating to Google authentication, edit the corresponding file on your server by replacing those lines with the code example above.


This is an ancient post so you've probably moved on from this issue now, but the bug is still present today in Odoo 18. I hope this answer will help someone who has this issue and is googling their butt of to no avail.


Good luck!

1 Comment
Avatar
Discard
Avatar
odoo
-

This is a valid solution but not newby friendly. What I did was add the HTTP endpoint in "Authorized redirect URIs" (your app must be on test mode) and that's it.

0
Avatar
odoo
Best Answer

I have same Issue; I already changed url to https in web.base.url but still odoo send http version of url to google for redirect sync, how I can force odoo to send https

Avatar
Discard