How to Connect to Odoo using Google Account
5 March, 2021 by
How to Connect to Odoo using Google Account
Administrator
| No comments yet

Important: Make sure Odoo is correctly configured to send email before starting this tutorial. Odoo will need to email an activation link when you enable OAUTH. So, let’s get started. Enabling OAuth Support in Odoo

  1. Login to Odoo as the Administrator
  2. Browse to Settings -> Apps
  3. In the search box, clear the Apps filter
  4. Search for OAuth2
  5. Click Install to add the OAuth2 Authentication module

alt text

  1. After Successful Installation Browse to Settings -> Configuration -> General Settings:
  2. Allow external users to sign up ->check this (Required to provide Sign Up Facilty to other Users)
  3. Allow users to sign in with Google.
  4. Template user for new users created through signup must be Template User.

alt text

Enabling Google App Engine Admin Console

This step will be required only if You Wish to use it For Google Business App Account

  1. Browse to https://admin.google.com and login as the Google domain adminstrator
  2. Click More Controls at the bottom of the page
  3. Click More Google Apps
  4. Click the X next to Filter: Top featured services to clear the filter
  5. Scroll down the list and click Google App Engine Admin Console
  6. Turn it ON for everyone

Create Google Apps OAuth2 access for Odoo

This is the most Important Part of Setup

  1. Browse to Google Developers Console https://console.developers.google.com and if necessary login
  2. Click Create Project (top left)

alt text

  1. In Project Name enter whatever you want, e.g. odoologin
  2. Click Create

alt text

  1. In the menu on the left, expand APIs & auth then click Credentials
  2. Now, From the List Select “OAuth 2.0 client ID”

alt text

  1. Click on Configure Content screen To Verify Your Account Detail and Save it
  2. Select Application type to Web application
  3. Here, it is mandatory to enter full domain name. (Must have a protocol. Cannot contain URL fragments,IP address or relative paths. Cannot be a public IP address.)
  4. If you wish to setup this thing in your Local System then you need to create Alias in your system.
  5. Under Authorized JavaScript origins enter your server domain name (it is optional for odoo), e.g. http://mydomain.com
  6. Under Authorized redirect URIs enter you domain plus the OAUTH path. (/auth_oauth/signin), e.g. http://mydomain.com/auth_oauth/signin
  7. Click Create

alt text

  1. After Successful Creation You Need to copy client ID

Add Google OAuth2 credentials to Odoo

  1. Login to Odoo as the Administrator
  2. Browse to Settings -> Users -> OAuth Providers
  3. Click Google OAuth2 Account to open that Record
  4. Click Edit then check the Allowed checkbox
  5. Enter OAuth 2.0 client ID in client Id field

alt text

  1. Click Save.

After this setup go to Login Screen Click on Login In With Google button which will Redirect you to Google login screen enter your Google credentials and grant access to OpenERP.

alt text

After Allowing Access you will be Redirect to OpenERP System .

alt text

Thanks.

Sign in to leave a comment