Skip to Content
Menu
This question has been flagged
1 Reply
1569 Views

How to send data from odoo to another oracle database using AP I? mettre a jours ou creer ou suprimer les donnes d une application oracle externes a partir de odoo

Avatar
Discard
Author

Helpful gread .

I need to have exemple of code or example of addons in odoo apps which use cx_Oracle

Thanks your so much

Best Answer

There are several ways to send data from Odoo to another Oracle database using an API, but one way to do this would be to use the Odoo ORM (Object-Relational Mapping) to interact with the external Oracle database.

First, you will need to install the cx_Oracle library, which allows Python to connect to Oracle databases. You can do this by running "pip install cx_Oracle" in your command line.

Next, you will need to create a new model in Odoo that represents the table in the external Oracle database that you want to interact with. In this model, you will need to define the fields that correspond to the columns in the table, as well as any methods that you will use to create, update, or delete records in the table.

Once you have created the model, you will need to create a new method that connects to the external Oracle database using the cx_Oracle library and performs the desired CRUD (Create, Read, Update, Delete) operation.

For example, to create a new record in the external Oracle table, you could create a method in your Odoo model that takes in the necessary data as arguments, creates a new cx_Oracle connection, and then uses the connection to insert the data into the external table using an SQL INSERT statement.

It is important to note that you will need to have the necessary credentials and permissions to connect to the external Oracle database, and that you should also consider the security implications of sending data between the two systems.

Avatar
Discard
Author

Helpful gread .

I need to have exemple of code or example of addons in odoo apps which use cx_Oracle

Thanks your so much

Related Posts Replies Views Activity
3
Mar 23
2571
0
Jul 21
951
0
Dec 21
1998
1
Jun 20
6247
0
Nov 19
5595