Hello Guys.
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, lets get started.
Enabling OAuth Support in Odoo
- Login to Odoo as the Administrator
- Browse to Settings -> Apps
- In the search box, clear the Apps filter
- Search for OAuth2
- Click Install to add the OAuth2 Authentication module
- After Successful Installation Browse to Settings -> Configuration -> General Settings:
- Allow external users to sign up ->check this (Required to provide Sign Up Facilty to other Users)
- Allow users to sign in with Google.
- Template user for new users created through signup must be Template User.
Enabling Google App Engine Admin Console
This step will be required only if You Wish to use it For Google Business App Account
- Browse to https://admin.google.com and login as the Google domain adminstrator
- Click More Controls at the bottom of the page
- Click More Google Apps
- Click the X next to Filter: Top featured services to clear the filter
- Scroll down the list and click Google App Engine Admin Console
- Turn it ON for everyone
Create Google Apps OAuth2 access for Odoo
This is the most Important Part of Setup
- Browse to Google Developers Console https://console.developers.google.com and if necessary login
- Click Create Project (top left)
- In Project Name enter whatever you want, e.g. odoologin
- Click Create
- In the menu on the left, expand APIs & auth then click Credentials
- Now, From the List Select "OAuth 2.0 client ID"
- Click on Configure Content screen To Verify Your Account Detail and Save it
- Select Application type to Web application
- 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.)
- If you wish to setup this thing in your Local System then you need to create Alias in your system.
- Under Authorized JavaScript origins enter your server domain name (it is optional for odoo), e.g. http://mydomain.com
Under Authorized redirect URIs enter you domain plus the OAUTH path. (/auth_oauth/signin), e.g. http://mydomain.com/auth_oauth/signin
Click Create
- After Successful Creation You Need to copy client ID
Add Google OAuth2 credentials to Odoo
- Login to Odoo as the Administrator
- Browse to Settings -> Users -> OAuth Providers
- Click Google OAuth2 Account to open that Record
- Click Edit then check the Allowed checkbox
- Enter OAuth 2.0 client ID in client Id field
- 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.
After Allowing Access you will be Redirect to OpenERP System .
Thanks.
0 Comment(s)