| @ -0,0 +1,54 @@ | |||
| .. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg | |||
|    :target: https://www.gnu.org/licenses/lgpl-3.0.en.html | |||
|    :alt: License: LGPL-3 | |||
| Odoo REST API | |||
| ============================================== | |||
| *  Rest Api - Odoo 16 community & Enterprise | |||
| * This module allow us to connect to database with REST API requests | |||
| 
 | |||
| Installation | |||
| ----------- | |||
|  * www.odoo.com/documentation/16.0/setup/install.html | |||
|  * Install our custom addon | |||
| 
 | |||
| Configuration | |||
| ----------- | |||
| * Set up the config file | |||
| * Authentication using POSTman with login credentials | |||
| * API key generation | |||
| * Communicate with database using API requests | |||
| 
 | |||
| License | |||
| ------- | |||
| Lesser General Public License v3.0 (LGPL v3) | |||
| (https://www.gnu.org/licenses/lgpl-3.0.en.html) | |||
| 
 | |||
| Company | |||
| ------- | |||
| * `Cybrosys Techno Solutions <https://cybrosys.com/>`__ | |||
| 
 | |||
| Credits | |||
| ------- | |||
| Developer : (V16) yadhushankar @ Cybrosys | |||
| 
 | |||
| 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,24 @@ | |||
| # -*- coding:utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | |||
| # | |||
| #    You can modify it under the terms of the GNU LESSER | |||
| #    GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #    (LGPL v3) along with this program. | |||
| #    If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 
 | |||
| from . import controllers | |||
| from . import models | |||
| @ -0,0 +1,44 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | |||
| # | |||
| #    You can modify it under the terms of the GNU LESSER | |||
| #    GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #    (LGPL v3) along with this program. | |||
| #    If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| { | |||
|     "name": "Odoo rest API", | |||
|     "description": """The Rest API for Odoo 16""", | |||
|     "summary": """This app helps to interact with odoo | |||
|      backend with help of rest api requests""", | |||
|     "category": "Tools", | |||
|     "version": "16.0.1.0.0", | |||
|     'author': 'Cybrosys Techno Solutions', | |||
|     'company': 'Cybrosys Techno Solutions', | |||
|     'maintainer': 'Cybrosys Techno Solutions', | |||
|     'website': "https://www.cybrosys.com", | |||
|     "depends": ['base', 'web'], | |||
|     "data": [ | |||
|         'security/ir.model.access.csv', | |||
|         'views/res_users_views.xml', | |||
|         'views/connection_api_views.xml' | |||
|     ], | |||
|     'images': ['static/description/banner.png'], | |||
|     'license': 'LGPL-3', | |||
|     'installable': True, | |||
|     'application': True, | |||
|     'auto_install': False, | |||
| } | |||
| @ -0,0 +1,23 @@ | |||
| # -*- coding:utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | |||
| # | |||
| #    You can modify it under the terms of the GNU LESSER | |||
| #    GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #    (LGPL v3) along with this program. | |||
| #    If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 
 | |||
| from . import main | |||
| @ -0,0 +1,243 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | |||
| # | |||
| #    You can modify it under the terms of the GNU LESSER | |||
| #    GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #    (LGPL v3) along with this program. | |||
| #    If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 
 | |||
| import json | |||
| import logging | |||
| from odoo import http | |||
| from odoo.http import request | |||
| 
 | |||
| _logger = logging.getLogger(__name__) | |||
| 
 | |||
| 
 | |||
| class RestApi(http.Controller): | |||
|     """This is a controller which is used to generate responses based on the | |||
|     api requests""" | |||
| 
 | |||
|     def auth_api_key(self, api_key): | |||
|         """This function is used to authenticate the api-key when sending a | |||
|         request""" | |||
| 
 | |||
|         user_id = request.env['res.users'].search([('api_key', '=', api_key)]) | |||
|         if api_key is not None and user_id: | |||
|             response = True | |||
|         elif not user_id: | |||
|             response = ('<html><body><h2>Invalid <i>API Key</i> ' | |||
|                         '!</h2></body></html>') | |||
|         else: | |||
|             response = ("<html><body><h2>No <i>API Key</i> Provided " | |||
|                         "!</h2></body></html>") | |||
| 
 | |||
|         return response | |||
| 
 | |||
|     def generate_response(self, method, model, rec_id): | |||
|         """This function is used to generate the response based on the type | |||
|         of request and the parameters given""" | |||
|         option = request.env['connection.api'].search( | |||
|             [('model_id', '=', model)], limit=1) | |||
|         model_name = option.model_id.model | |||
| 
 | |||
|         if method != 'DELETE': | |||
|             data = json.loads(request.httprequest.data) | |||
|         else: | |||
|             data = {} | |||
|         fields = [] | |||
|         if data: | |||
|             for field in data['fields']: | |||
|                 fields.append(field) | |||
|         if not fields and method != 'DELETE': | |||
|             return ("<html><body><h2>No fields selected for the model" | |||
|                     "</h2></body></html>") | |||
|         if not option: | |||
|             return ("<html><body><h2>No Record Created for the model" | |||
|                     "</h2></body></html>") | |||
|         try: | |||
|             if method == 'GET': | |||
|                 fields = [] | |||
|                 for field in data['fields']: | |||
|                     fields.append(field) | |||
|                 if not option.is_get: | |||
|                     return ("<html><body><h2>Method Not Allowed" | |||
|                             "</h2></body></html>") | |||
|                 else: | |||
|                     datas = [] | |||
|                     if rec_id != 0: | |||
|                         partner_records = request.env[ | |||
|                             str(model_name)].search_read( | |||
|                             domain=[('id', '=', rec_id)], | |||
|                             fields=fields | |||
|                         ) | |||
|                         data = json.dumps({ | |||
|                             'records': partner_records | |||
|                         }) | |||
|                         datas.append(data) | |||
|                         return request.make_response(data=datas) | |||
|                     else: | |||
|                         partner_records = request.env[ | |||
|                             str(model_name)].search_read( | |||
|                             domain=[], | |||
|                             fields=fields | |||
|                         ) | |||
|                         data = json.dumps({ | |||
|                             'records': partner_records | |||
|                         }) | |||
|                         datas.append(data) | |||
|                         return request.make_response(data=datas) | |||
|         except: | |||
|             return ("<html><body><h2>Invalid JSON Data" | |||
|                     "</h2></body></html>") | |||
|         if method == 'POST': | |||
|             if not option.is_post: | |||
|                 return ("<html><body><h2>Method Not Allowed" | |||
|                         "</h2></body></html>") | |||
|             else: | |||
|                 try: | |||
|                     data = json.loads(request.httprequest.data) | |||
|                     datas = [] | |||
|                     new_resource = request.env[str(model_name)].create( | |||
|                         data['values']) | |||
|                     partner_records = request.env[ | |||
|                         str(model_name)].search_read( | |||
|                         domain=[('id', '=', new_resource.id)], | |||
|                         fields=fields | |||
|                     ) | |||
|                     new_data = json.dumps({'New resource': partner_records, }) | |||
|                     datas.append(new_data) | |||
|                     return request.make_response(data=datas) | |||
|                 except: | |||
|                     return ("<html><body><h2>Invalid JSON Data" | |||
|                             "</h2></body></html>") | |||
|         if method == 'PUT': | |||
|             if not option.is_put: | |||
|                 return ("<html><body><h2>Method Not Allowed" | |||
|                         "</h2></body></html>") | |||
|             else: | |||
|                 if rec_id == 0: | |||
|                     return ("<html><body><h2>No ID Provided" | |||
|                             "</h2></body></html>") | |||
|                 else: | |||
|                     resource = request.env[str(model_name)].browse( | |||
|                         int(rec_id)) | |||
|                     if not resource.exists(): | |||
|                         return ("<html><body><h2>Resource not found" | |||
|                                 "</h2></body></html>") | |||
|                     else: | |||
|                         try: | |||
|                             datas = [] | |||
|                             data = json.loads(request.httprequest.data) | |||
|                             resource.write(data['values']) | |||
|                             partner_records = request.env[ | |||
|                                 str(model_name)].search_read( | |||
|                                 domain=[('id', '=', resource.id)], | |||
|                                 fields=fields | |||
|                             ) | |||
|                             new_data = json.dumps( | |||
|                                 {'Updated resource': partner_records, | |||
|                                  }) | |||
|                             datas.append(new_data) | |||
|                             return request.make_response(data=datas) | |||
| 
 | |||
|                         except: | |||
|                             return ("<html><body><h2>Invalid JSON Data " | |||
|                                     "!</h2></body></html>") | |||
|         if method == 'DELETE': | |||
|             if not option.is_delete: | |||
|                 return ("<html><body><h2>Method Not Allowed" | |||
|                         "</h2></body></html>") | |||
|             else: | |||
|                 if rec_id == 0: | |||
|                     return ("<html><body><h2>No ID Provided" | |||
|                             "</h2></body></html>") | |||
|                 else: | |||
|                     resource = request.env[str(model_name)].browse( | |||
|                         int(rec_id)) | |||
|                     if not resource.exists(): | |||
|                         return ("<html><body><h2>Resource not found" | |||
|                                 "</h2></body></html>") | |||
|                     else: | |||
| 
 | |||
|                         records = request.env[ | |||
|                             str(model_name)].search_read( | |||
|                             domain=[('id', '=', resource.id)], | |||
|                             fields=['id', 'display_name'] | |||
|                         ) | |||
|                         remove = json.dumps( | |||
|                             {"Resource deleted": records, | |||
|                              }) | |||
|                         resource.unlink() | |||
|                         return request.make_response(data=remove) | |||
| 
 | |||
|     @http.route(['/send_request'], type='http', | |||
|                 auth='none', | |||
|                 methods=['GET', 'POST', 'PUT', 'DELETE'], csrf=False) | |||
|     def fetch_data(self, **kw): | |||
|         """This controller will be called when sending a request to the | |||
|         specified url, and it will authenticate the api-key and then will | |||
|         generate the result""" | |||
| 
 | |||
|         http_method = request.httprequest.method | |||
|         api_key = request.httprequest.headers.get('api-key') | |||
|         auth_api = self.auth_api_key(api_key) | |||
|         model = kw.get('model') | |||
|         username = request.httprequest.headers.get('login') | |||
|         password = request.httprequest.headers.get('password') | |||
|         request.session.authenticate(request.session.db, username, | |||
|                                      password) | |||
|         model_id = request.env['ir.model'].search( | |||
|             [('model', '=', model)]) | |||
|         if not model_id: | |||
|             return ("<html><body><h3>Invalid model, check spelling or maybe " | |||
|                     "the related " | |||
|                     "module is not installed" | |||
|                     "</h3></body></html>") | |||
| 
 | |||
|         if auth_api == True: | |||
|             if not kw.get('Id'): | |||
|                 rec_id = 0 | |||
|             else: | |||
|                 rec_id = int(kw.get('Id')) | |||
|             result = self.generate_response(http_method, model_id.id, rec_id) | |||
|             return result | |||
|         else: | |||
|             return auth_api | |||
| 
 | |||
|     @http.route(['/odoo_connect'], type="http", auth="none", csrf=False, | |||
|                 methods=['GET']) | |||
|     def odoo_connect(self, **kw): | |||
|         """This is the controller which initializes the api transaction by | |||
|         generating the api-key for specific user and database""" | |||
| 
 | |||
|         username = request.httprequest.headers.get('login') | |||
|         password = request.httprequest.headers.get('password') | |||
|         db = request.httprequest.headers.get('db') | |||
|         try: | |||
|             request.session.update(http.get_default_session(), db=db) | |||
|             auth = request.session.authenticate(request.session.db, username, | |||
|                                                 password) | |||
|             user = request.env['res.users'].browse(auth) | |||
|             api_key = request.env.user.generate_api(username) | |||
|             datas = json.dumps({"Status": "auth successful", | |||
|                                 "User": user.name, | |||
|                                 "api-key": api_key}) | |||
|             return request.make_response(data=datas) | |||
|         except: | |||
|             return ("<html><body><h2>wrong login credentials" | |||
|                     "</h2></body></html>") | |||
| @ -0,0 +1,5 @@ | |||
| ## Module <rest_api_odoo> | |||
| 
 | |||
| #### 28.12.2023 | |||
| #### Version 16.0.1.0.0 | |||
|  - Initial Commit for Odoo REST API | |||
| @ -0,0 +1,24 @@ | |||
| # -*- coding:utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | |||
| # | |||
| #    You can modify it under the terms of the GNU LESSER | |||
| #    GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #    (LGPL v3) along with this program. | |||
| #    If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 
 | |||
| from . import connection_api | |||
| from . import res_users | |||
| @ -0,0 +1,47 @@ | |||
| # -*- coding:utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | |||
| # | |||
| #    You can modify it under the terms of the GNU LESSER | |||
| #    GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #    (LGPL v3) along with this program. | |||
| #    If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 
 | |||
| from odoo import fields, models | |||
| 
 | |||
| 
 | |||
| class ConnectionApi(models.Model): | |||
|     """This class is used to create an api model in which we can create | |||
|     records with models and fields, and also we can specify methods.""" | |||
|     _name = 'connection.api' | |||
|     _rec_name = 'model_id' | |||
| 
 | |||
|     model_id = fields.Many2one('ir.model', string="Model", | |||
|                                domain="[('transient', '=', False)]", | |||
|                                help="Select model which can be accessed by " | |||
|                                     "REST api requests.") | |||
|     is_get = fields.Boolean(string='GET', | |||
|                             help="Select this to enable GET method " | |||
|                                  "while sending requests.") | |||
|     is_post = fields.Boolean(string='POST', | |||
|                              help="Select this to enable POST method" | |||
|                                   "while sending requests.") | |||
|     is_put = fields.Boolean(string='PUT', | |||
|                             help="Select this to enable PUT method " | |||
|                                  "while sending requests.") | |||
|     is_delete = fields.Boolean(string='DELETE', | |||
|                                help="Select this to enable DELETE method " | |||
|                                     "while sending requests.") | |||
| @ -0,0 +1,45 @@ | |||
| # -*- coding:utf-8 -*- | |||
| ############################################################################# | |||
| # | |||
| #    Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #    Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | |||
| # | |||
| #    You can modify it under the terms of the GNU LESSER | |||
| #    GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #    (LGPL v3) along with this program. | |||
| #    If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################# | |||
| 
 | |||
| import uuid | |||
| from odoo import fields, models | |||
| 
 | |||
| 
 | |||
| class UserLogin(models.Model): | |||
|     """This class is used to inherit users and add api key generation""" | |||
|     _inherit = 'res.users' | |||
| 
 | |||
|     api_key = fields.Char(string="API Key", readonly=True, | |||
|                           help="Api key for connecting with the " | |||
|                                "Database.The key will be " | |||
|                                "generated when authenticating " | |||
|                                "rest api.") | |||
| 
 | |||
|     def generate_api(self, username): | |||
|         """This function is used to generate api-key for each user""" | |||
|         users = self.env['res.users'].sudo().search([('login', '=', username)]) | |||
|         if not users.api_key: | |||
|             users.api_key = str(uuid.uuid4()) | |||
|             key = users.api_key | |||
|         else: | |||
|             key = users.api_key | |||
|         return key | |||
| 
 | 
| 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.2 KiB | 
| After Width: | Height: | Size: 673 B | 
| 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: 1.5 KiB | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 1.9 KiB | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 2.1 KiB | 
| After Width: | Height: | Size: 4.4 KiB | 
| After Width: | Height: | Size: 589 B | 
| After Width: | Height: | Size: 3.4 KiB | 
| After Width: | Height: | Size: 1.7 KiB | 
| After Width: | Height: | Size: 2.3 KiB | 
| After Width: | Height: | Size: 967 B | 
| After Width: | Height: | Size: 1.6 KiB | 
| After Width: | Height: | Size: 3.8 KiB | 
| After Width: | Height: | Size: 5.0 KiB | 
| After Width: | Height: | Size: 69 KiB | 
| After Width: | Height: | Size: 85 KiB | 
| After Width: | Height: | Size: 90 KiB | 
| After Width: | Height: | Size: 90 KiB | 
| After Width: | Height: | Size: 86 KiB | 
| After Width: | Height: | Size: 81 KiB | 
| After Width: | Height: | Size: 125 KiB | 
| After Width: | Height: | Size: 114 KiB | 
| After Width: | Height: | Size: 116 KiB | 
| After Width: | Height: | Size: 136 KiB | 
| After Width: | Height: | Size: 70 KiB | 
| After Width: | Height: | Size: 52 KiB | 
| After Width: | Height: | Size: 51 KiB | 
| After Width: | Height: | Size: 60 KiB | 
| After Width: | Height: | Size: 65 KiB | 
| After Width: | Height: | Size: 28 KiB | 
| After Width: | Height: | Size: 90 KiB | 
| After Width: | Height: | Size: 18 KiB | 
| @ -0,0 +1,862 @@ | |||
| <div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;"> | |||
|     <!-- TITLE BAR --> | |||
|     <div class="d-flex align-items-center justify-content-between" | |||
|          style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> | |||
|         <img src="assets/misc/cybrosys-logo.png" width="42" height="42" | |||
|              style="width: 42px; height: 42px;"/> | |||
|         <div> | |||
|             <div | |||
|                     style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | |||
|                     class="mr-2"> | |||
|                 <i class="fa fa-check mr-1"></i>Community | |||
|             </div> | |||
|             <div | |||
|                     style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | |||
|                     class="mr-2"> | |||
|                 <i class="fa fa-check mr-1"></i>Enterprise | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
|     <!-- END OF TITLE BAR --> | |||
|     <div class="container"> | |||
|         <div class="row"> | |||
|             <div class="col-sm-12 col-md-12 col-lg-12"> | |||
|                 <!-- APP HERO --> | |||
|                 <h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> | |||
|                     Odoo rest API</h1> | |||
| 
 | |||
|                 <img src="./assets/screenshots/hero.gif" class="img-responsive" | |||
|                      width="100%" height="auto"/> | |||
| 
 | |||
|                 <!-- END OF APP HERO --> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| 
 | |||
| <!-- NAVIGATION SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/compass.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Explore This | |||
|         Module</h2> | |||
| </div> | |||
| <div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#overview"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">Learn | |||
|             more about this | |||
|             module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#features"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">View | |||
|             features of this | |||
|             module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#screenshots"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">View | |||
|             screenshots for this | |||
|             module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF NAVIGATION SECTION --> | |||
| 
 | |||
| <!-- OVERVIEW SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/pie-chart.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Overview | |||
|     </h2> | |||
| </div> | |||
| <div class="row" | |||
|      style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> | |||
|     <div class="col-sm-12 py-4"> | |||
|         The odoo Rest API module allow us to connect to database with the help | |||
|         of GET , POST , PUT and DELETE requests. | |||
|     </div> | |||
| </div> | |||
| <!-- END OF OVERVIEW SECTION --> | |||
| 
 | |||
| <!-- FEATURES SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/features.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Features | |||
|     </h2> | |||
| </div> | |||
| <div class="row" | |||
|      style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> | |||
|     <div class="col-sm-12 col-md-6"> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 40px; margin-bottom: 40px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Api key generation using database authentication.</span> | |||
|         </div> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6"> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Authentication using the generated api key.</span> | |||
|         </div> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6"> | |||
| 
 | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Available in Odoo 16.0 Community and Enterprise.</span> | |||
|         </div> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6"> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Can create records for the models we want to access.</span> | |||
|         </div> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6"> | |||
| 
 | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Choose specific fields for data fetching.</span> | |||
|         </div> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6"> | |||
| 
 | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Choose specific methods like GET, POST etc.</span> | |||
|         </div> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6"> | |||
| 
 | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Create and update records from database.</span> | |||
|         </div> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6"> | |||
| 
 | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Delete records.</span> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF FEATURES SECTION --> | |||
| 
 | |||
| <!-- SCREENSHOTS SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" | |||
|      id="screenshots"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/pictures.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Screenshots | |||
|     </h2> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
| 
 | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Installing and configuration | |||
|             </h3> | |||
|             <p | |||
|                     style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> | |||
|             <ul> | |||
|                 <li>First of all, we have to add a new parameter in odoo conf. | |||
|                     file. | |||
|                 </li> | |||
|                 <li><b>server_wide_modules = web, base, rest_api_odoo</b><br/> | |||
|                     - This will allow us to send request to server without | |||
|                     selecting database first.<br/>- Incase if you have to | |||
|                     uninstall the module , you have to remove this parameter. | |||
|                     <br/>- Next we can install the module. | |||
|                 </li> | |||
|                 <li>After installing the Rest api app we can see a new api key | |||
|                     field in users. | |||
|                 </li> | |||
|                 - Next we have to generate the api-key for the current | |||
|                 user.<br/> | |||
|                 <li>You can import the postman collections provided in the app | |||
|                     folder for authentication and interacting with database in | |||
|                     various methods. | |||
|                 </li> | |||
|             </ul> | |||
|             </p> | |||
|             <img src="assets/screenshots/screenshot_1.png" | |||
|                  class="img-thumbnail"> | |||
|             <hr> | |||
|             <center> | |||
|                 <img src="assets/screenshots/screenshot_9.png" | |||
|                      class="img-thumbnail"></center> | |||
|         </div> | |||
| 
 | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Authentication | |||
|             </h3> | |||
|             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | |||
|             <ul> | |||
|                 <li>Next you have to select the database and login.</li> | |||
|                 <li>We have attached <b>Postman collections</b> through which | |||
|                     you can | |||
|                     authenticate rest api. | |||
|                 </li> | |||
|             <li>First, extract the <b>zip</b> file. Then, you will obtain the JSON-format file, which you can directly import into <b>POSTMAN.</b></li> | |||
|                 <li>The url format will be like this - <b>http://cybrosys:8016/odoo_connect</b> | |||
|                     Replace 'cybrosys:8016' with your localhost port number. | |||
|                 </li> | |||
|                 <li>You have to provide database name, username and password | |||
|                     through the headers while sending request. | |||
|                 </li> | |||
|                 <li>If the authentication is successful , an api key will be | |||
|                     generated for the current user. | |||
|                 </li> | |||
|                 <li>This key will be used when sending api requests to | |||
|                     database. | |||
|                 </li> | |||
|                 <li>The response will be like this - <b> {"Status": "auth | |||
|                     successful", "User": "Mitchell Admin", "api-key": | |||
|                     "66c2ebab-d4dc-42f0-87d0-d1646e887569"}.</b></li> | |||
|             </ul> | |||
|             </p> | |||
|             <img src="assets/screenshots/screenshot_2.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Create records in Rest api app | |||
|             </h3> | |||
|             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | |||
|             <ul> | |||
|                 <li>After rest api authentication, we can create records in the | |||
|                     rest api app. | |||
|                 </li> | |||
|                 <li>Here we can choose the model, and also we can | |||
|                     choose the http methods. | |||
|                 </li> | |||
|                 <li>The api response will be based on these records.</li> | |||
|             </ul> | |||
|             </p> | |||
|             <img src="assets/screenshots/screenshot_3.png" | |||
|                  class="img-thumbnail"> | |||
|             <hr> | |||
|             <img src="assets/screenshots/screenshot_4.png" | |||
|                  class="img-thumbnail"> | |||
|             <hr> | |||
|             <img src="assets/screenshots/screenshot_5.png" | |||
|                  class="img-thumbnail"> | |||
|             <hr> | |||
|             <img src="assets/screenshots/screenshot_6.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Get Records | |||
|             </h3> | |||
|             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | |||
|             <ul> | |||
|                 <li>You can send GET request to retrieve data from the | |||
|                     database. | |||
|                 </li> | |||
|                 <li>The postman collection has been provided with app files for | |||
|                     sending request from postman. | |||
|                 </li> | |||
|                 <li>You have to provide username, password and api key through | |||
|                     the header. | |||
|                 </li> | |||
|                 <li>Model can be passed as argument as the technical name , and | |||
|                     also if you want | |||
|                     specific record you can provide the id as well. | |||
|                 </li> | |||
|                 <li>The format for GET method will be like this - <b>http://cybrosys:8016/send_request?model=res.partner&Id=10.</b> | |||
|                 </li> | |||
|                 <li>We can specify the fields inside the JSON data, and it will | |||
|                     be like this - <b>{"fields": ["name", "email"]}.</b></li> | |||
|                 <li>This is the format of api response - <b>{"records": [{"id": | |||
|                     10, "email": "deco.addict82@example.com", "name": "Deco | |||
|                     Addict"}]}.</b> | |||
|                 </li> | |||
| 
 | |||
|             </ul> | |||
|             </p> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Create Records | |||
|             </h3> | |||
|             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | |||
|             <ul> | |||
|                 <li>Using POST method , you can create new records in the | |||
|                     database. | |||
|                 </li> | |||
|                 <li>Just make sure you enabled POST method for the model record | |||
|                     in rest api app , otherwise you will get <b>'method not | |||
|                         allowed'</b> message. | |||
|                 </li> | |||
|                 <li>For creating record you have to provide the JSON data along | |||
|                     with the model. | |||
|                 </li> | |||
|                 <li>You can make use of the postman collection that we have | |||
|                     added with app files. | |||
|                 </li> | |||
|                 <li>The format for sending POST request will be like this - <b>http://cybrosys:8016/send_request?model=res.partner.</b> | |||
|                 </li> | |||
|                 <li>This is the format for JSON data - <b>{ | |||
|                     "fields" :["name", "phone"] , | |||
|                     "values": {"name": "abc", | |||
|                     "phone":"55962441552" | |||
|                     } }.</b> | |||
|                 </li> | |||
|                 <li>Make sure the data entered in correct format otherwise you | |||
|                     will get <b>'Invalid JSON data' message.</b></li> | |||
|                 <li>Response will be in this format - <b>{"New resource": | |||
|                     [{"id": 51, "name": "abc", "phone": "55962441552"}]}.</b> | |||
|                 </li> | |||
|             </ul> | |||
|             </p> | |||
| 
 | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Update Records | |||
|             </h3> | |||
|             <ul> | |||
|                 <li>Updation of records in the database can be done with PUT | |||
|                     method. | |||
|                 </li> | |||
|                 <li>You have to provide the model and also the id or the record | |||
|                     that you want to update. | |||
|                 </li> | |||
|                 <li>You can use the Postman collection that we have provided and , you | |||
|                     will be always have to send request with your login | |||
|                     credentials. Otherwise, it will be  showing access denied. | |||
|                 </li> | |||
|                 <li>The format for sending PUT request will be like this - <b>http://cybrosys:8016/send_request?model=res.partner&Id=46.</b> | |||
|                 </li> | |||
|                 <li>Here too you have to provide the JSON data through which the | |||
|                     updates will be done. | |||
|                 </li> | |||
|                 <li>The response format will be like this - <b>{"Updated | |||
|                     resource": [{"id": 46, "email": "abc@example.com", "name": | |||
|                     "Toni"}]}.</b></li> | |||
|             </ul> | |||
|             </p> | |||
| 
 | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Delete Records | |||
|             </h3> | |||
|             <p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> | |||
|             <ul> | |||
|                 <li>Database records can be deleted by sending DELETE method | |||
|                     request. | |||
|                 </li> | |||
|                 <li>For the deletion we have to provide the Model and the record | |||
|                     id that we want to delete. | |||
|                 </li> | |||
|                 <li>Make sure you have permission to delete files for the | |||
|                     selected model in the rest api record. | |||
|                 </li> | |||
|                 <li>The delete request format will be like this - <b>http://cybrosys:8016/send_request?model=res.partner&Id=46.</b> | |||
|                 </li> | |||
|                 <li> The response after successful deletion will be -<b> | |||
|                     {"Resource deleted": [{"id": 46, "email": "abc@example.com", | |||
|                     "name": "Toni"}]}.</b></li> | |||
|             </ul> | |||
|             </p> | |||
| 
 | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| </div> | |||
| <!-- END OF SCREENSHOTS SECTION --> | |||
| 
 | |||
| <!-- RELATED PRODUCTS --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/categories.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Related | |||
|         Products | |||
|     </h2> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div id="demo1" class="row carousel slide" data-ride="carousel"> | |||
|             <!-- The slideshow --> | |||
|             <div class="carousel-inner" style="padding: 30px;"> | |||
|                 <div class="carousel-item" style="min-height: 198.656px;"> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/auto_database_backup/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/1.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/access_restriction_by_ip/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/2.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/multi_branch_base//" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/3.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                 </div> | |||
|                 <div class="carousel-item active" | |||
|                      style="min-height: 198.656px;"> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/import_user_excel/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/4.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/database_delete_protection/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/5.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/odoo_chatgpt_connector/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/6.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|             <!-- Left and right controls --> | |||
|             <a class="carousel-control-prev" href="#demo1" 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="#demo1" | |||
|                     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> | |||
| </div> | |||
| <!-- END OF RELATED PRODUCTS --> | |||
| 
 | |||
| <!-- OUR SERVICES --> | |||
| 
 | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/star.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Our Services | |||
|     </h2> | |||
| </div> | |||
| 
 | |||
| <div class="container my-5"> | |||
|     <div class="row"> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/cogs.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Customization</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/wrench.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Implementation</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/lifebuoy.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Support</h6> | |||
|         </div> | |||
| 
 | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/user.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Hire | |||
|                 Odoo | |||
|                 Developer</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #54a0ff  !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/puzzle.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Integration</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/update.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Migration</h6> | |||
|         </div> | |||
| 
 | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/consultation.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Consultancy</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/training.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Implementation</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/license.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Licensing Consultancy</h6> | |||
|         </div> | |||
|     </div> | |||
| 
 | |||
| </div> | |||
| 
 | |||
| <!-- END OF END OF OUR SERVICES --> | |||
| 
 | |||
| <!-- OUR INDUSTRIES --> | |||
| 
 | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/corporate.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Our | |||
|         Industries | |||
|     </h2> | |||
| </div> | |||
| 
 | |||
| <div class="container my-5"> | |||
|     <div class="row"> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/trading-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Trading | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Easily procure | |||
|                     and | |||
|                     sell your products</p> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/pos-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     POS | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Easy | |||
|                     configuration | |||
|                     and convivial experience</p> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/education-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Education | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     A platform for | |||
|                     educational management</p> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/manufacturing-black.png" | |||
|                      class="img-responsive mb-3" height="48px" | |||
|                      width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Manufacturing | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Plan, track and | |||
|                     schedule your operations</p> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/ecom-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     E-commerce & Website | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Mobile | |||
|                     friendly, | |||
|                     awe-inspiring product pages</p> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/service-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Service Management | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Keep track of | |||
|                     services and invoice</p> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/restaurant-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Restaurant | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Run your bar or | |||
|                     restaurant methodically</p> | |||
|             </div> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/hotel-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Hotel Management | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     An | |||
|                     all-inclusive | |||
|                     hotel management application</p> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| 
 | |||
| <!-- END OF END OF OUR INDUSTRIES --> | |||
| 
 | |||
| <!-- SUPPORT --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/customer-support.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Support | |||
|     </h2> | |||
| </div> | |||
| <div class="container mt-5"> | |||
|     <div class="row"> | |||
|         <div class="col-sm-12 col-md-6"> | |||
|             <div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> | |||
|                 <div class="mr-4 d-flex justify-content-center align-items-center" | |||
|                      style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> | |||
|                     <img src="assets/misc/support.png" height="48" width="48" | |||
|                          style="width: 42px; height: 42px;"/> | |||
|                 </div> | |||
|                 <div> | |||
|                     <h4>Need Help?</h4> | |||
|                     <p style="line-height: 100%;">Got questions or need help? | |||
|                         Get in touch.</p> | |||
|                     <a href="mailto:odoo@cybrosys.com"> | |||
|                         <p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> | |||
|                             odoo@cybrosys.com</p> | |||
|                     </a> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-sm-12 col-md-6"> | |||
|             <div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> | |||
|                 <div class="mr-4 d-flex justify-content-center align-items-center" | |||
|                      style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> | |||
|                     <img src="assets/misc/whatsapp.png" height="52" width="52" | |||
|                          style="width: 52px; height: 52px;"/> | |||
|                 </div> | |||
|                 <div> | |||
|                     <h4>WhatsApp</h4> | |||
|                     <p style="line-height: 100%;">Say hi to us on WhatsApp!</p> | |||
|                     <a href="https://api.whatsapp.com/send?phone=918606827707"> | |||
|                         <p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> | |||
|                             +91 86068 | |||
|                             27707</p> | |||
|                     </a> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
|     <div class="row"> | |||
|         <div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> | |||
|             <img src="assets/misc/logo.png" width="144" height="31" | |||
|                  style="width:144px; height: 31px; margin-top: 40px;"/> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF SUPPORT --> | |||
| @ -0,0 +1,64 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
|     <!-- Form view for 'connection.api' model.  --> | |||
|     <record id="connection_api_view_form" model="ir.ui.view"> | |||
|         <field name="name">connection.api.view.form</field> | |||
|         <field name="model">connection.api</field> | |||
|         <field name="arch" type="xml"> | |||
|             <form> | |||
|                 <sheet> | |||
|                     <group> | |||
|                         <group string="Resource"> | |||
|                             <field name="model_id" string="Model"/> | |||
|                         </group> | |||
|                         <group string="Methods"> | |||
|                             <field name="is_get"/> | |||
|                             <field name="is_post"/> | |||
|                             <field name="is_put"/> | |||
|                             <field name="is_delete"/> | |||
|                         </group> | |||
|                     </group> | |||
|                 </sheet> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
|     <!-- Tree view for 'connection.api' model.  --> | |||
| 
 | |||
|     <record id="connection_api_view_tree" model="ir.ui.view"> | |||
|         <field name="name">connection.api.view.tree</field> | |||
|         <field name="model">connection.api</field> | |||
|         <field name="arch" type="xml"> | |||
|             <tree> | |||
|                 <field name="model_id" string="Model"/> | |||
|                 <field name="is_get"/> | |||
|                 <field name="is_post"/> | |||
|                 <field name="is_put"/> | |||
|                 <field name="is_delete"/> | |||
|             </tree> | |||
|         </field> | |||
|     </record> | |||
|     <!-- Action  for 'connection.api' model with Tree and form views.  --> | |||
| 
 | |||
|     <record id="rest_api_root_action" model="ir.actions.act_window"> | |||
|         <field name="name">Rest API Records</field> | |||
|         <field name="type">ir.actions.act_window</field> | |||
|         <field name="res_model">connection.api</field> | |||
|         <field name="view_mode">tree,form</field> | |||
|         <field name="help" type="html"> | |||
|             <p class="o_view_nocontent_smiling_face"> | |||
|                 Create! | |||
|             </p> | |||
|         </field> | |||
|     </record> | |||
|     <!-- Menu items for the REST API.  --> | |||
| 
 | |||
|     <menuitem id="rest_api_root" | |||
|               name="Rest API" | |||
|               sequence="10" | |||
|               web_icon="rest_api_odoo,static/description/icon.png"/> | |||
|     <menuitem id="rest_api_details_root" | |||
|               name="Rest API" | |||
|               parent="rest_api_root" | |||
|               action="rest_api_root_action" | |||
|               sequence="10"/> | |||
| </odoo> | |||
| @ -0,0 +1,18 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
|     <!-- Inherited user view for Adding API key.  --> | |||
|     <record id="view_users_form" model="ir.ui.view"> | |||
|         <field name="name">view.users.form.inherit.rest.api.odoo</field> | |||
|         <field name="inherit_id" ref="base.view_users_form"/> | |||
|         <field name="model">res.users</field> | |||
|         <field name="arch" type="xml"> | |||
|             <xpath expr="//page[@name='access_rights']" position="after"> | |||
|                 <page string="API" name="rest-api"> | |||
|                     <group> | |||
|                         <field name="api_key" groups="base.group_user"/> | |||
|                     </group> | |||
|                 </page> | |||
|             </xpath> | |||
|         </field> | |||
|     </record> | |||
| </odoo> | |||