When upgrading from Odoo 13 to Odoo 14, it may be necessary to transfer data between two distinctOdoodatabases using the XML-RPC protocol. Here’s how to move partner data from Odoo 14 to Odoo 15:
Steps:
- First, import the XML-RPC client.
- Fetch all partner records from the Odoo 14 database using the following URL: http://server name:port and the database name: “database name”. Use the login credentials: login 14 and password: pwd 14.
- Define the specifics of the Odoo 14 database in the variables:
- URL: url 13 (the operating port of the Odoo 14 database)
- Database name: db 14
- Login for the database: login 14
- Password for the database: pwd 14
- Using the xmlrpc/2/common endpoint, authenticate the user identification uid 14. The authenticate function returns the user identification.
- Call the Odoo model methods using the execute kw Rpc function utilising the xmlrpc/2/object endpoint.
- Fetch partner record values in the Odoo 14 database. Only the name and email values for each partner record that were specified in the field’s keyword have been obtained here.
- Request the server’s version with the following code line to determine whether or not the connection information is accurate before authenticating.
- Submit the same information for the Odoo 15 database as for the Odoo 14 database:
- URL: “http://server name:port” for url 15
- Database name: db 15
- Login for the database: login 15
- Password for the database: pwd 15
- Using the user identity obtained after successfully authenticating the credentials, create or transfer partner entries from the Odoo 14 database to the Odoo 15 database.
- Send the values of partner records from the Odoo 14 database to be generated on the Odoo 15 database. In this case, specify the database name, user identification, password, model, and a method to be called upon the model of the Odoo 15 database.
- After transferring partner records, the Odoo 15 database should have all partner records moved from the Odoo 14 database.
- XML-RPC can be used to transmit data across databases for activities like creating, searching, reading, writing, unlinking, and more.
Before transferring partner records, the Odoo 15 database had only 2 records while the Odoo 14 database had roughly 36 partner records. After transferring, the Odoo 15 database should have a total of 38 records.
Wan buffer services thrilled to be part of Odoo Community Days India 2024! Mark your calendars for August 23-24 to engage with industry leaders and discover the latest in Odoo technology and solutions. See you there!