コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
5824 ビュー


I have a server with odoo sh and an external one, I need to connect to the external db, I tried it with the postgresql dblink package, psql but it doesn't allow me to create the extension. ERROR: permission denied to create extension "dblink" How could I connect to the other db?

アバター
破棄
最善の回答

Hi,

You can connect two odoo database using the xmlrpc ,

import xmlrpclib
url = 'http://0.0.0.0:8012'
db = 'db_name'
username = 'admin'
password = 'admin'

common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url))
uid = common.authenticate(db, username, password, {})
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))

Also see this video, showing how the data is transferred between two database using xmlrpc :-  Transfer Data Between Databases Using XMLRPC In Odoo : Database Migration


Odoo Doc : https://www.odoo.com/documentation/13.0/webservices/odoo.html

Thanks

アバター
破棄
関連投稿 返信 ビュー 活動
7
7月 25
50524
0
2月 25
1799
2
1月 25
8471
0
12月 24
1337
ODOO.sh 解決済
2
10月 24
13252