Posts

A Step-by-Step Guide to Download Sale Invoices from Odoo 17 Using Python Flask and XML-RPC

Image
1. Importing necessary libraries ```python from flask import Flask, request, jsonify, send_file import xmlrpc.client import requests ``` - Flask : A web framework used for building web applications in Python. - xmlrpc.client : A library for making XML-RPC calls. - requests : A library for making HTTP requests. 2. Setting up Odoo connection details ```python url = 'https://your_odoo_instance_url.com' db = 'your_odoo_database' username = 'your_odoo_username' password = 'your_odoo_password' ``` - url : URL of your Odoo instance. - db : Database name in Odoo. - username : Username for authentication. - password : Password for authentication. 3. Authenticating with Odoo ```python session_url = f'{url}web/session/authenticate' data = {     'jsonrpc': '2.0',     'method': 'call',     'params': {         "service": "common",         "method": "login",         'db': db...

Elasticsearch APIs

Image
 (12/07/22) There are 5 major Elasticsearch APIs. 1. Document APIs 2. Search APIs 3. Aggregation 4. Index APIs 5. Cluster APIs   1. Document APIs                         Document APIs are further categorized into two major categories.     I. Single Document API:                    In case we need to perform an operation on a single document we use these APIs for Querying.  Index API -                 Let's use PUT query first.                                                             And the response should be like the below image.                  ...

Installing Elasticsearch (ELK Stack) on Windows laptop

Image
(12/07/22)  This is my first day of office and my mentor gave me a task to learn Elasticsearch. So I started learning from tutorials on YouTube and this is my learning for the day. Step 1: Download Elasticsearch from  HERE Step 2: Extract the ZIP file which is downloaded. Step 3: Once you extract the ZIP file you could see this. Open 'bin' folder and you could see this. Double click on ' elasticsearch.bat ' file. Step 4: Once you run the bat file your cmd will be automatically opened and the following commands will be executed automatically.