@ -0,0 +1,54 @@ |
|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
Odoo Login Through Github |
|||
======================== |
|||
This module will enable login to odoo through Github. |
|||
|
|||
Features |
|||
======== |
|||
* Login to odoo through git hub. |
|||
* Login process made easy in a single button click. |
|||
|
|||
Configuration |
|||
============= |
|||
In GitHub, navigate to Settings > Developer settings and create a new OAuth app. |
|||
Copy the Client ID and Client Secret, then paste them into the corresponding |
|||
fields in Odoo under General Settings > Users & Companies > OAuth Providers. |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (AGPL v3). |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
* Developers (V17) Athira K, |
|||
Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
from . import controllers |
|||
from . import models |
@ -0,0 +1,43 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
{ |
|||
'name': "Odoo Login Through Github", |
|||
'version': '17.0.1.0.0', |
|||
'category': 'Extra Tools', |
|||
'summary': """Login odoo with Github""", |
|||
'description': """This module allows user to login using their github credentials in a single button click.""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['auth_oauth','sale'], |
|||
'data': [ |
|||
'data/github_oauth_data.xml', |
|||
'views/auth_oauth_provider_views.xml', |
|||
], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'images': ['static/description/banner.jpg'], |
|||
'application': True, |
|||
} |
|||
|
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
from . import github_login_odoo |
@ -0,0 +1,288 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
import json |
|||
import logging |
|||
import werkzeug |
|||
from odoo import _, api, http, SUPERUSER_ID |
|||
from odoo.exceptions import AccessDenied |
|||
from odoo.http import request |
|||
from odoo.addons.auth_oauth.controllers.main import (fragment_to_query_string, |
|||
OAuthController, OAuthLogin) |
|||
from odoo.addons.auth_signup.controllers.main import AuthSignupHome as Home |
|||
from odoo.addons.web.controllers.utils import _get_login_redirect_url, ensure_db |
|||
from werkzeug.exceptions import BadRequest |
|||
from odoo import registry as registry_get |
|||
|
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
|
|||
class AuthLoginHome(Home): |
|||
"""HTTP controller to login via github""" |
|||
|
|||
@http.route() |
|||
def web_login(self, *args, **kw): |
|||
""" |
|||
Override the web login method to handle OAuth errors and display |
|||
available OAuth providers. |
|||
|
|||
""" |
|||
ensure_db() |
|||
|
|||
# Handle redirection if the request method is GET, user is |
|||
# authenticated, and redirect URL is provided |
|||
if request.httprequest.method == 'GET' and request.session.uid: |
|||
redirect_url = request.params.get('redirect') |
|||
if redirect_url: |
|||
return request.redirect(redirect_url) |
|||
|
|||
# List OAuth providers |
|||
providers = self.list_providers() |
|||
|
|||
# Call parent class login method |
|||
response = super(OAuthLogin, self).web_login(*args, **kw) |
|||
|
|||
# Process response if it is a QWeb template |
|||
if response.is_qweb: |
|||
# Define error messages in a dictionary |
|||
error_messages = { |
|||
'1': _("You are not allowed to signup on this database."), |
|||
'2': _("Access Denied"), |
|||
'3': _( |
|||
"Email Already Exists.\nPlease contact your " |
|||
"Administrator."), |
|||
'4': _( |
|||
"Validation Endpoint either Not present or invalid.\nPlease" |
|||
"contact your Administrator."), |
|||
'5': _( |
|||
"Github OAuth API Failed, For more information please " |
|||
"contact Administrator."), |
|||
'6': _( |
|||
"Github OAuth API Failed,\nClient ID or Client Secret Not" |
|||
" present or has been compromised.\n" |
|||
"For more information please contact Administrator.") |
|||
} |
|||
|
|||
# Get the error message if an OAuth error code is present |
|||
error_code = request.params.get('oauth_error') |
|||
error_message = error_messages.get(error_code) |
|||
|
|||
# Add providers and error message to the response context |
|||
response.qcontext.update({ |
|||
'providers': providers, |
|||
'error': error_message |
|||
}) |
|||
return response |
|||
|
|||
|
|||
class GitHubOAuthController(OAuthController): |
|||
"""Controller to sign in to home page""" |
|||
|
|||
@http.route('/auth_oauth/signin', type='http', auth='none') |
|||
@fragment_to_query_string |
|||
def signin(self, **kw): |
|||
""" |
|||
Handle OAuth sign-in redirection and user authentication. |
|||
|
|||
This route is responsible for processing the OAuth sign-in callback |
|||
and initiating the user authentication |
|||
process. |
|||
It retrieves the database name, OAuth provider, and other context |
|||
information from the state parameter. |
|||
The user authentication is performed using the OAuth credentials |
|||
provided in the request. |
|||
After successful authentication, the user is redirected to the |
|||
appropriate page based on the state |
|||
parameters. |
|||
|
|||
""" |
|||
# Extract and validate state parameters |
|||
state_json = kw.get('state', '{}') |
|||
try: |
|||
state = json.loads(state_json) |
|||
except json.JSONDecodeError: |
|||
_logger.error("Invalid state parameter: %s", state_json) |
|||
return BadRequest() |
|||
|
|||
dbname = state.get('d') |
|||
if not dbname or not http.db_filter([dbname]): |
|||
return BadRequest() |
|||
|
|||
provider = state.get('p') |
|||
context = state.get('c', {}) |
|||
action = state.get('a') |
|||
menu = state.get('m') |
|||
redirect_url = state.get('r') |
|||
|
|||
# Get registry and authenticate |
|||
registry = registry_get(dbname) |
|||
try: |
|||
with registry.cursor() as cr: |
|||
context.update({'provider': provider, 'github': True}) |
|||
env = api.Environment(cr, SUPERUSER_ID, context) |
|||
db, login, key = env['res.users'].sudo().auth_oauth(provider, |
|||
kw) |
|||
cr.commit() |
|||
# Determine the redirection URL |
|||
if redirect_url: |
|||
url = werkzeug.urls.url_unquote_plus(redirect_url) |
|||
else: |
|||
url = '/web' |
|||
if action: |
|||
url = f'/web#action={action}' |
|||
elif menu: |
|||
url = f'/web#menu_id={menu}' |
|||
|
|||
# Authenticate session and handle redirection |
|||
pre_uid = request.session.authenticate(db, login, key) |
|||
resp_url = _get_login_redirect_url(pre_uid, url) |
|||
resp = request.redirect(resp_url, 303) |
|||
# Adjust location header if necessary |
|||
if werkzeug.urls.url_parse(resp.location).path == '/web': |
|||
resp.location = '/' |
|||
return resp |
|||
except AttributeError: |
|||
_logger.error( |
|||
"auth_signup not installed on database %s: oauth sign up " |
|||
"cancelled.", |
|||
dbname) |
|||
return request.redirect("/web/login?oauth_error=1", 303) |
|||
|
|||
except AccessDenied: |
|||
_logger.info( |
|||
'OAuth2: access denied, redirecting to main page if a valid ' |
|||
'session exists.') |
|||
return request.redirect("/web/login?oauth_error=3", 303) |
|||
|
|||
except Exception as e: |
|||
_logger.exception("OAuth2 error: %s", str(e)) |
|||
return request.redirect("/web/login?oauth_error=2", 303) |
|||
|
|||
|
|||
class OAuthLogin(OAuthLogin): |
|||
"""Controller to login""" |
|||
def list_providers(self): |
|||
""" |
|||
Retrieve a list of enabled OAuth providers. |
|||
|
|||
This method queries the database for OAuth providers that are |
|||
enabled. |
|||
For each provider, it generates an authentication link based on |
|||
the provider's details. |
|||
The authentication link is used to initiate the OAuth authentication |
|||
process. |
|||
|
|||
""" |
|||
try: |
|||
providers = (request.env['auth.oauth.provider'].sudo(). |
|||
search_read([('enabled', '=', True)])) |
|||
except Exception: |
|||
providers = [] |
|||
for provider in providers: |
|||
state = self.get_state(provider) |
|||
if provider.get('name') in ['GitHub', 'github']: |
|||
params = dict( |
|||
client_id=provider['client_id'], |
|||
scope=provider['scope'], |
|||
state=json.dumps(state), |
|||
) |
|||
provider['auth_link'] = ("%s?%s" |
|||
% (provider['auth_endpoint'], |
|||
werkzeug.urls.url_encode(params))) |
|||
else: |
|||
return_url = request.httprequest.url_root + 'auth_oauth/signin' |
|||
params = dict( |
|||
response_type='token', |
|||
client_id=provider['client_id'], |
|||
redirect_uri=return_url, |
|||
scope=provider['scope'], |
|||
state=json.dumps(state), |
|||
) |
|||
provider['auth_link'] = ("%s?%s" |
|||
% (provider['auth_endpoint'], |
|||
werkzeug.urls.url_encode(params))) |
|||
return providers |
|||
|
|||
|
|||
class CallbackHandler(http.Controller): |
|||
"""Controller for call back URL""" |
|||
|
|||
@http.route(['/oauth/callback'], auth='public', csrf=False, |
|||
methods=['GET', 'POST'], type='http') |
|||
def get_oauth_token(self, **post): |
|||
""" |
|||
Handle OAuth callback to retrieve access token. |
|||
|
|||
This route handles the OAuth callback after a user has authenticated |
|||
with an OAuth provider. |
|||
It extracts the state and provider information from the request |
|||
parameters to identify the OAuth provider. |
|||
Based on the provider, it retrieves the client ID and client secret |
|||
to exchange the authorization code for |
|||
an access token. |
|||
The access token is then appended to the redirect URL and the user |
|||
is redirected to the sign-in page with |
|||
the token. |
|||
""" |
|||
# Determine OAuth provider |
|||
state = post.get('state') |
|||
if state: |
|||
try: |
|||
provider_id = json.loads(state).get('p') |
|||
provider = request.env['auth.oauth.provider'].sudo().browse( |
|||
provider_id) |
|||
except (json.JSONDecodeError, ValueError): |
|||
_logger.error('Invalid state parameter: %s', state) |
|||
return werkzeug.utils.redirect("/web/login?oauth_error=4", 303) |
|||
else: |
|||
provider = request.env.ref( |
|||
'github_oauth_app.auth_oauth_provider_github').sudo() |
|||
|
|||
# Prepare redirect URL |
|||
base_redirect_url = request.httprequest.url_root + "auth_oauth/signin" |
|||
|
|||
# Handle OAuth code and redirection |
|||
if post.get("code"): |
|||
client_id = provider.client_id |
|||
client_secret = provider.client_secret |
|||
|
|||
if not client_id or not client_secret: |
|||
_logger.info( |
|||
'OAuth2: Missing Client ID or Client Secret. Redirecting to ' |
|||
'login page.') |
|||
return werkzeug.utils.redirect("/web/login?oauth_error=6", 303) |
|||
|
|||
# Build redirect URL with query parameters |
|||
query_params = { |
|||
'access_token': post.get("code"), |
|||
'state': state, |
|||
'provider': provider.id |
|||
} |
|||
redirect_url = (f"{base_redirect_url}?" |
|||
f"{werkzeug.urls.url_encode(query_params)}") |
|||
|
|||
return werkzeug.utils.redirect(redirect_url) |
|||
|
|||
# Handle missing code in post data |
|||
_logger.warning( |
|||
"OAuth2: Code not present in post data. Redirecting to login page.") |
|||
return werkzeug.utils.redirect("/web/login?oauth_error=4", 303) |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!--Adding OAuth provider details--> |
|||
<odoo> |
|||
<record id="auth_oauth_provider_github" model="auth.oauth.provider"> |
|||
<field name="name">GitHub</field> |
|||
<field name="auth_endpoint">https://github.com/login/oauth/authorize</field> |
|||
<field name="scope">user:email</field> |
|||
<field name="enabled">True</field> |
|||
<field name="validation_endpoint">https://github.com/login/oauth/access_token</field> |
|||
<field name="css_class">fa fa-fw fa-github</field> |
|||
<field name="body">Log in with GitHub</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,6 @@ |
|||
## Module <github_login_odoo> |
|||
|
|||
#### 11.06.2025 |
|||
#### Version 17.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Odoo Login Through Github |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
from . import auth_oauth_provider |
|||
from . import res_users |
@ -0,0 +1,55 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
import logging |
|||
from odoo import fields, models |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
|
|||
class AuthOAuthProvider(models.Model): |
|||
"""Inherits auth.oauth.provider to add fields""" |
|||
_inherit = "auth.oauth.provider" |
|||
|
|||
client_secret = fields.Char(string="Client Secret",help="Client Secret Key") |
|||
is_github = fields.Boolean(compute='_compute_is_github') |
|||
|
|||
def _compute_is_github(self): |
|||
""" |
|||
Compute the value for is_github field based on the auth_endpoint |
|||
value. |
|||
|
|||
This method iterates over the records to compute the value for the |
|||
`is_github` field. |
|||
It checks if each record's authentication endpoint contains 'github'. |
|||
If the authentication endpoint contains 'github', it sets the |
|||
`is_github` field to True. |
|||
Otherwise, it sets the `is_github` field to False. |
|||
|
|||
""" |
|||
for rec in self: |
|||
if rec.auth_endpoint: |
|||
if 'github' in rec.auth_endpoint: |
|||
rec.is_github = True |
|||
else: |
|||
rec.is_github = False |
|||
else: |
|||
rec.is_github = False |
@ -0,0 +1,216 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
import logging |
|||
import requests |
|||
import werkzeug |
|||
from odoo import _, api, fields, models |
|||
from odoo.addons.auth_signup.models.res_partner import SignupError |
|||
from odoo.exceptions import AccessDenied |
|||
from odoo.tools.misc import ustr |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
|
|||
class ResUsers(models.Model): |
|||
"""Inherit res.users model to add fields""" |
|||
_inherit = 'res.users' |
|||
|
|||
oauth_token = fields.Char(readonly=True) |
|||
git_username = fields.Char(default="No username",help="Username") |
|||
git_email = fields.Char(string="Github Email",help="Email") |
|||
|
|||
def _auth_oauth_rpc(self, endpoint, access_token): |
|||
""" |
|||
Perform an OAuth RPC call to the specified endpoint with the |
|||
provided access token. |
|||
|
|||
This method performs an OAuth RPC call to the given endpoint using |
|||
the provided access token. |
|||
If the context indicates GitHub authentication, it specifically |
|||
handles GitHub OAuth calls to retrieve user |
|||
data. |
|||
For other OAuth providers, it uses the standard OAuth authorization |
|||
header or access token for the request. |
|||
It handles the response and returns the user data or error |
|||
information. |
|||
""" |
|||
if self.env.context.get('github'): |
|||
provider = (self.env['auth.oauth.provider']. |
|||
browse(self.env.context.get('provider'))) |
|||
params = { |
|||
'client_id': provider.client_id, |
|||
'client_secret': provider.client_secret, |
|||
'code': access_token, |
|||
'scope': 'user:email' # Add this line to request email access |
|||
} |
|||
response = requests.get(endpoint, params=params, timeout=10) |
|||
if response.ok: |
|||
response_data = response.content.decode("UTF-8").split('&') |
|||
if 'error=' in response_data or 'error=' in response_data[0]: |
|||
r_url = "/web/login?oauth_error=5" |
|||
_logger.info( |
|||
'OAuth2: access denied, redirect to main page in case a ' |
|||
'valid session exists, without setting cookies.' |
|||
' REASON :- %s' % str( |
|||
response_data[0])) |
|||
redirect = werkzeug.utils.redirect(r_url, 303) |
|||
redirect.autocorrect_location_header = False |
|||
return redirect |
|||
auth_token = response_data[0].split('=')[1] |
|||
user_data_response = requests.get('https://api.github.com/' |
|||
'user/emails', auth=('', auth_token)).json() |
|||
email = [email_data['email'] for email_data in |
|||
user_data_response if email_data['primary']][0] |
|||
user_data = requests.get('https://api.github.com/user', |
|||
auth=('', auth_token)).json() |
|||
params = { |
|||
'key': auth_token, |
|||
'user_id': user_data.get('id'), |
|||
'username': user_data.get('login'), |
|||
'name': user_data.get('name'), |
|||
'email': email |
|||
} |
|||
return params |
|||
else: |
|||
if (self.env['ir.config_parameter'].sudo(). |
|||
get_param('auth_oauth.authorization_header')): |
|||
response = requests.get(endpoint, |
|||
headers={'Authorization': 'Bearer %s' |
|||
% access_token}, timeout=10) |
|||
else: |
|||
response = requests.get(endpoint, |
|||
params={'access_token': access_token}, |
|||
timeout=10) |
|||
if response.ok: # nb: could be a successful failure |
|||
return response.json() |
|||
auth_challenge = werkzeug.http.parse_www_authenticate_header( |
|||
response.headers.get('WWW-Authenticate')) |
|||
if auth_challenge.type == 'bearer' and 'error' in auth_challenge: |
|||
return dict(auth_challenge) |
|||
return {'error': 'invalid_request'} |
|||
|
|||
@api.model |
|||
def _auth_oauth_validate(self, provider, access_token): |
|||
""" |
|||
Validate the OAuth access token with the specified provider and |
|||
retrieve user data. |
|||
|
|||
This method validates the provided OAuth access token with the |
|||
given provider's validation endpoint. |
|||
If validation is successful, it retrieves additional user data from |
|||
the provider's data endpoint. |
|||
It then processes the validation response to extract the user's |
|||
subject identity and returns the validation |
|||
data. |
|||
""" |
|||
oauth_provider = self.env['auth.oauth.provider'].browse(provider) |
|||
validation = self._auth_oauth_rpc(oauth_provider.validation_endpoint, |
|||
access_token) |
|||
if validation.get("error"): |
|||
raise Exception(validation['error']) |
|||
if oauth_provider.data_endpoint: |
|||
data = self._auth_oauth_rpc(oauth_provider.data_endpoint, |
|||
access_token) |
|||
validation.update(data) |
|||
if self.env.context.get('github'): |
|||
return validation |
|||
subject = next(filter(None, [ |
|||
validation.pop(key, None) |
|||
for key in [ |
|||
'sub', |
|||
'id', |
|||
'user_id', |
|||
] |
|||
]), None) |
|||
if not subject: |
|||
raise AccessDenied('Missing subject identity') |
|||
validation['user_id'] = subject |
|||
|
|||
return validation |
|||
|
|||
def github_api_hit(self): |
|||
""" |
|||
Trigger GitHub OAuth authorization by redirecting to GitHub's |
|||
authorization URL. |
|||
|
|||
This method retrieves the GitHub OAuth provider configuration and |
|||
constructs the authorization URL. |
|||
It checks if the client ID is available and redirects the user to |
|||
GitHub's authorization page. |
|||
The authorization URL includes the required client ID and scopes |
|||
(repo and user) for the OAuth request. |
|||
""" |
|||
provider = self.env.ref('github_oauth_app.auth_oauth_provider_github') |
|||
provider = self.env[provider._name].sudo().browse(provider.id) |
|||
if provider: |
|||
if not provider.client_id: |
|||
r_url = "/web/login?oauth_error=6" |
|||
_logger.info( |
|||
'OAuth2: Either of Client ID or Client Secret not present, ' |
|||
'access denied, redirect to main page in case a valid ' |
|||
'session exists, without setting cookies') |
|||
redirect = werkzeug.utils.redirect(r_url, 303) |
|||
redirect.autocorrect_location_header = False |
|||
return redirect |
|||
url = ("https://github.com/login/oauth/authorize?client_id=%s&" |
|||
"scope=repo,user") % provider.client_id |
|||
response = requests.get(url) |
|||
if response.status_code in [200, 201]: |
|||
return response.url |
|||
|
|||
@api.model |
|||
def _signup_create_user(self, values): |
|||
""" |
|||
Create a new user during signup using the default method. |
|||
|
|||
This method calls the default user creation method during signup. |
|||
It simply delegates the user creation process to the parent class |
|||
method. |
|||
""" |
|||
return super(ResUsers, self)._signup_create_user(values) |
|||
|
|||
def _create_user_from_default_template(self, values): |
|||
""" |
|||
Create a new user based on the default user template. |
|||
|
|||
This method creates a new user by copying the default user template. |
|||
It validates the provided values and ensures that essential fields |
|||
like login, name, and partner are |
|||
provided. |
|||
If the template user does not exist or the required values are |
|||
missing, it raises appropriate exceptions. |
|||
""" |
|||
template_user = self.env.ref('base.default_user') |
|||
if not template_user.exists(): |
|||
raise ValueError(_('Signup: invalid template user')) |
|||
if not values.get('login'): |
|||
raise ValueError(_('Signup: no login given for new user')) |
|||
if not values.get('partner_id') and not values.get('name'): |
|||
raise ValueError(_('Signup: no name or partner given for new user')) |
|||
values['active'] = True |
|||
try: |
|||
with ((self.env.cr.savepoint())): |
|||
return template_user.with_context(no_reset_password=True |
|||
).copy(values) |
|||
except Exception as e: |
|||
# copy may fail if asked login is not available. |
|||
raise SignupError(ustr(e)) |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 173 KiB |
After Width: | Height: | Size: 7.8 KiB |
@ -0,0 +1,736 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>Odoo App 3 Index</title> |
|||
<!-- Bootstrap CSS --> |
|||
<link rel="stylesheet" |
|||
href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" |
|||
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" |
|||
crossorigin="anonymous"> |
|||
<link rel="stylesheet" |
|||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"> |
|||
<link rel="preconnect" href="https://fonts.googleapis.com"> |
|||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
|||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" |
|||
rel="stylesheet"> |
|||
</head> |
|||
<body> |
|||
<section> |
|||
<div class="container" |
|||
style="font-family: 'Inter', sans-serif !important;background-color: #fff !important;"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between flex-wrap align-items-sm-center" |
|||
style="border-bottom:1px solid rgba(0, 0, 0, 0.22)"> |
|||
<div class="my-3"> |
|||
<img src="assets/misc/Cybrosys R.png" |
|||
style="width:auto !important; height:40px !important"> |
|||
</div> |
|||
<div class="my-3 d-flex align-items-center"> |
|||
<div class="text-center" |
|||
style="background-color:#017E84 !important;font-size: 0.8rem !important; color:#fff !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width: 120px !important;"> |
|||
Community |
|||
</div> |
|||
<div class="text-center" |
|||
style="background-color:#875A7B !important; color:#fff !important;font-size: 0.8rem !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important;min-width: 120px !important;"> |
|||
Enterprise |
|||
</div> |
|||
<div class="text-center" |
|||
style="background-color:#7C7BAD !important; color:#fff !important;font-size: 0.8rem !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width: 120px !important;"> |
|||
Odoo.sh |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-12 col-lg-12 text-center d-flex align-items-center flex-column" |
|||
style="margin: 80px 0px !important;"> |
|||
<h1 style="font-size: 2.8rem;font-weight: 700; color: |
|||
#1A202C;"> |
|||
Odoo Login Through Github</h1> |
|||
<p class="my-3 mb-4" |
|||
style="max-width: 80%; font-weight: 400 !important; line-height: 32px; color: #718096;"> |
|||
Login to Odoo In a Single Click Using Github Credentials. |
|||
</p> |
|||
<div style="width: 80%; margin-top: 3rem;"> |
|||
<img src="hero-v17.gif" |
|||
class="img-responsive" width="100%" height="auto"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container mt-5 mb-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4"> |
|||
<p class="m-0" |
|||
style="font-weight: 600; font-size: 24px; color:#714b67 !important"> |
|||
Key Highlights |
|||
</p> |
|||
</div> |
|||
<div class="row py-4"> |
|||
<div class="col-md-6 col-sm-12 p-3"> |
|||
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px; |
|||
background: #FFF; |
|||
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); "> |
|||
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67; |
|||
display: flex; justify-content: center; align-items: center; |
|||
margin-right: 10px; flex-shrink: 0;"> |
|||
<i class="fa-solid fa-star " |
|||
style="color: #fff;font-size:14px;"></i> |
|||
</div> |
|||
<div> |
|||
<p style="color: #1A202C;font-weight: 600; |
|||
font-size: 1.2rem; margin-bottom: 2px;"> |
|||
Available in Odoo 17.0 Community and |
|||
Enterprise.</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-6 col-sm-12 p-3"> |
|||
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px; |
|||
background: #FFF; |
|||
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); "> |
|||
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67; |
|||
display: flex; justify-content: center; align-items: center; |
|||
margin-right: 10px; flex-shrink: 0;"> |
|||
<i class="fa-solid fa-star " |
|||
style="color: #fff;font-size:14px;"></i> |
|||
</div> |
|||
<div> |
|||
<p style="color: #1A202C;font-weight: 600; |
|||
font-size: 1.2rem; margin-bottom: 2px;"> |
|||
Login to Odoo in a single click using github credentials.</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container rounded"> |
|||
<ul class="nav nav-tabs d-flex" |
|||
style="width: fit-content;margin: 0 auto;gap: 1rem;"> |
|||
<li class="col text-center py-2 text-nowrap " |
|||
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"> |
|||
<a |
|||
class="active show" data-toggle="tab" href="#tab1" |
|||
style="color: #fff;font-weight: 500; background-color: #714B67; text-decoration: none;"> |
|||
<i class="fa-regular fa-image pr-2" |
|||
style="color: #fff;"></i> |
|||
Screenshots</a></li> |
|||
<li class="col text-center py-2 text-nowrap " |
|||
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"> |
|||
<a |
|||
data-toggle="tab" href="#tab2" |
|||
style="color: #fff;font-weight: 500; text-decoration: none;"><i |
|||
class="fa-solid fa-star pr-2" |
|||
style="color: #fff;"></i>Features</a></li> |
|||
<li class="col text-center py-2 text-nowrap " |
|||
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"> |
|||
<a |
|||
data-toggle="tab" href="#tab3" |
|||
style="color: #fff;font-weight: 500; text-decoration: none; background-color: #714B67;"><i |
|||
class="fa-solid fa-book-open pr-2" |
|||
style="color: #fff;"></i>Released Notes</a></li> |
|||
</ul> |
|||
<div class="tab-content" |
|||
style="background-color: rgba(121, 113, 119, 0.04);"> |
|||
<div id="tab1" class="tab-pane fade in active show"> |
|||
<div class="col-lg-12 py-2" |
|||
style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screen shots/5.png" |
|||
class="img-responsive" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Before setting up the OAuth provider, enable 'Free sign up' for guests.</h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" |
|||
style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screen shots/impp.png" |
|||
class="img-responsive" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Login to your Github account, navigate to settings--> Developer settings--> New oauth app. Register a new app, |
|||
Provide the URL of your application homepage as 'Homepage URL' and append '/oauth/callback' to the home page URL for 'Authorization callback URL' . Now you can generate secret key. |
|||
Client ID will also be available from there.</h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" |
|||
style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screen shots/profile.png" |
|||
class="img-responsive" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Ensure that the 'Name' field is filled in the associated Git account's profile.</h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" |
|||
style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screen shots/1.png" |
|||
class="img-responsive" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Go to Settings > OAuth Providers.</h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" |
|||
style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screen shots/credentials.png" |
|||
class="img-responsive" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Here you can |
|||
add the credentials of your github account like |
|||
'Client ID' and 'Client Secret' Key. |
|||
</h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" |
|||
style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screen shots/3.png" |
|||
class="img-responsive" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Now you can click on the 'Log in with GitHub' |
|||
button to directly access your account.</h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" |
|||
style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screen shots/4.png" |
|||
class="img-responsive" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
The 'Customer Portal' from where user can |
|||
easily manage their data. </h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div id="tab2" class="tab-pane fade"> |
|||
<div class="col-mg-12" style="padding: 1rem 4rem;"> |
|||
<ul style="list-style: none; padding: 1rem 0;font-weight: 500;"> |
|||
<li class="py-3" |
|||
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<span style="margin-right: 12px;"><img |
|||
src="assets/misc/star (1) 2.svg" |
|||
alt="" |
|||
width="16px"></span>A new customer account will be |
|||
automatically |
|||
created in case user is new to the system. |
|||
</li> |
|||
<li class="py-3" |
|||
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<span style="margin-right: 12px;"><img |
|||
src="assets/misc/star (1) 2.svg" |
|||
alt="" |
|||
width="16px"></span>Available in |
|||
Odoo 17.0 Community and Enterprise |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
<div id="tab3" class="tab-pane fade"> |
|||
<div class="col-mg-12 active" style="padding: 1rem 4rem;"> |
|||
<div class="py-3" |
|||
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="d-flex mb-3" |
|||
style="font-size: 0.8rem; font-weight: 500;"><span>Version |
|||
17.0.1.0.0</span><span |
|||
class="px-2">|</span><span |
|||
style="color: #714B67;font-weight: 600;">Released on:16th Dec 2024</span> |
|||
</div> |
|||
<p class="m-0" |
|||
style=" color:#718096!important; font-size:1rem !important;line-height: 28px;"> |
|||
Initial Commit for Odoo Login Through Github</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-5"> |
|||
<p class="m-0" |
|||
style="font-weight: 600; font-size: 24px; color:#000 !important"> |
|||
Related Products</p> |
|||
</div> |
|||
</div> |
|||
<div id="myCarousel" class="carousel slide py-3" data-ride="carousel"> |
|||
<div class="carousel-inner"> |
|||
<div class="carousel-item active"> |
|||
<div class="row p-4"> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/whatsapp_mail_messaging/" |
|||
style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px; "> |
|||
<img src="assets/modules/m1.png" |
|||
alt="" width="100%" |
|||
height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold"> |
|||
Odoo Whatsup Connector</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/auto_logout_idle_user_odoo/" |
|||
style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px; "> |
|||
<img src="assets/modules/m2.jpg" |
|||
alt="" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold"> |
|||
Logout Idle User</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/whatsapp_redirect/" |
|||
style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px; "> |
|||
<img src="assets/modules/m3.png" |
|||
alt="" width="100%" |
|||
height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold"> |
|||
Send Whatsapp Message</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="carousel-item"> |
|||
<div class="row p-4"> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/base_account_budget/" |
|||
style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px; "> |
|||
<img src="assets/modules/m4.png" |
|||
alt="" width="100%" |
|||
height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold"> |
|||
Budget Management</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/product_barcode/" |
|||
style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px;"> |
|||
<img src="assets/modules/m5.png" |
|||
alt="" width="100%" |
|||
height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold"> |
|||
Product Barcode Generator</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/export_stockinfo_xls/" |
|||
style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px;"> |
|||
<img src="assets/modules/m6.png" |
|||
alt="" width="100%" |
|||
height="auto"> |
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold"> |
|||
Export Product Stock in Excel</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<a class="carousel-control-prev" href="#myCarousel" |
|||
data-slide="prev" style="width: 35px; color: #000;"> |
|||
<span class="carousel-control-prev-icon"> |
|||
<i class="fa fa-chevron-left" |
|||
style="font-size: 24px;"></i> |
|||
</span> |
|||
</a> |
|||
<a class="carousel-control-next" href="#myCarousel" |
|||
data-slide="next" style="width: 35px; color: #000;"> |
|||
<span class="carousel-control-next-icon"> |
|||
<i class="fa fa-chevron-right" |
|||
style="font-size: 24px;"></i> |
|||
</span> |
|||
</a> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4"> |
|||
<p class="m-0" |
|||
style="font-weight: 600; font-size: 24px; color:#000 !important"> |
|||
Our Services</p> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="container my-5"> |
|||
<div class="row py-3"> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#13EA36 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/cogs.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo |
|||
Customization</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#DBC711; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/wrench.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo |
|||
Implementation</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#FF6B6B ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/lifebuoy.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo |
|||
Support</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#FFA801 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/user.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Hire |
|||
Odoo Developer</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;"> |
|||
|
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#54A0FF; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/puzzle.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo |
|||
Integration</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#6D7680 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/update.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo |
|||
Migration</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#786FA6 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/consultation.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo |
|||
Consultancy</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#F8A5C2 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/training.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo |
|||
Implementation</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#E6BE26; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/license.png" |
|||
alt="service-icon" width="38px" |
|||
height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo |
|||
Licensing Consultancy</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4"> |
|||
<p class="m-0" |
|||
style="font-weight: 600; font-size: 24px; color:#000 !important"> |
|||
Our Industries</p> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="container"> |
|||
<div class="row my-5 py-4"> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100 " |
|||
style="border-right: 1px solid rgb(209, 209, 209); border-bottom: 1px solid rgb(209, 209, 209); padding: 30px; box-shadow: 6px 0 10px rgba(228, 227, 227, 0.373);"> |
|||
<img src="assets/icons/trading-black.png" width="42px" |
|||
height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Trading</p> |
|||
<p>Easily procure and sell your products</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209);border-bottom: 1px solid rgb(209, 209, 209); padding: 30px;"> |
|||
<img src="assets/icons/pos-black.png" width="42px" |
|||
height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">POS</p> |
|||
<p>Easy configuration and convivial experience</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209);border-bottom: 1px solid rgba(0, 0, 0, 0.2); padding: 30px; box-shadow: 0 5px 10px rgba(228, 227, 227, 0.373)"> |
|||
<img src="assets/icons/education-black.png" width="42px" |
|||
height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;"> |
|||
Education</p> |
|||
<p>A platform for educational management</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-bottom: 1px solid rgb(209, 209, 209); padding: 30px; "> |
|||
<img src="assets/icons/manufacturing-black.png" |
|||
width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;"> |
|||
Manufacturing</p> |
|||
<p>Plan, track and schedule your operations</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px;"> |
|||
<img src="assets/icons/ecom-black.png" width="42px" |
|||
height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">E-commerce & |
|||
Website</p> |
|||
<p>Mobile friendly, awe-inspiring product pages</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px;box-shadow: 0 -5px 10px rgba(228, 227, 227, 0.373);"> |
|||
<img src="assets/icons/service-black.png" width="42px" |
|||
height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Service |
|||
Management</p> |
|||
<p>Keep track of services and invoice</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px; "> |
|||
<img src="assets/icons/restaurant-black.png" |
|||
width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;"> |
|||
Restaurant</p> |
|||
<p>Run your bar or restaurant methodically</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style=" padding: 30px;box-shadow: -5px 0 10px rgba(228, 227, 227, 0.373);"> |
|||
<img src="assets/icons/hotel-black.png" width="42px" |
|||
height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Hotel |
|||
Management</p> |
|||
<p>An all-inclusive hotel management application</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-5"> |
|||
<p class="m-0" |
|||
style="font-weight: 600; font-size: 24px; color:#000 !important"> |
|||
Support</p> |
|||
</div> |
|||
</div> |
|||
<div class="container my-5"> |
|||
<div class="row" style="background-color: #FFFAFE;"> |
|||
<div class="col-md-6 pb-4 d-flex align-items-center justify-content-center" |
|||
style="border-right: 1px solid #D9D9D9;"> |
|||
<div style="padding: 30px;"> |
|||
<div class="d-flex align-items-center"> |
|||
<img src="assets/misc/support (1) 1.svg" alt="" |
|||
width="60px" style="margin-right: 12px;"> |
|||
<div style="padding: 0px 8px;"> |
|||
<span |
|||
style="color: #714B67;font-size: 24px;font-weight: 600;padding-bottom: 1rem;">Need |
|||
Help?</span> |
|||
<p class="m-0" style="color:#718096;">Got |
|||
questions or need help? Get in touch.</p> |
|||
<div style="font-weight: 400;"><span><img |
|||
src="assets/misc/support-email.svg" |
|||
alt="" |
|||
width="18px" |
|||
style="filter: invert(1);margin-right: 0.8rem;"></span>odoo@cybrosys.com |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-6 pb-4 d-flex align-items-center justify-content-center"> |
|||
<div style="padding: 30px;"> |
|||
<div class="d-flex align-items-center"> |
|||
<img src="assets/misc/whatsapp 1.svg" alt="" |
|||
width="60px" style="margin-right: 12px;"> |
|||
<div> |
|||
<span style="color: #714B67;font-size: 24px;font-weight: 600;">WhatsApp</span> |
|||
<p class="m-0" style="color:#718096;">Say hi to |
|||
us on WhatsApp!</p> |
|||
<div style="font-weight: 400; font-size: 16px;"><span><img |
|||
src="assets/misc/phone.svg" |
|||
alt="" width="14px" |
|||
style="filter: invert(1); margin-right: 0.8rem;"></span>+91 |
|||
99456767686 |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<!-- Optional JavaScript --> |
|||
<!-- jQuery first, then Popper.js, then Bootstrap JS --> |
|||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!--Adding fields to view--> |
|||
<odoo> |
|||
<record id="view_oauth_provider_form" model="ir.ui.view"> |
|||
<field name="name">view.oauth.provider.form</field> |
|||
<field name="model">auth.oauth.provider</field> |
|||
<field name="inherit_id" ref="auth_oauth.view_oauth_provider_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//field[@name = 'client_id']" position="after"> |
|||
<field name="client_secret" invisible ="not is_github" required = "is_github"/> |
|||
<field name="is_github" invisible="1"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |