-
Notifications
You must be signed in to change notification settings - Fork 9
Conexión con Odoo mediante XMLRPC
Ignacio Buioli edited this page Apr 14, 2021
·
2 revisions
import xmlrpclib
username = 'admin' # Odoo user
pwd = 'admin' # Odoo password
db = 'odoo' # Odoo base de datos
url = 'http://localhost:8069' # Odoo URL
common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url))
common.version()
uid = common.authenticate(db, username, pwd, {})
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))
partner_id = models.execute_kw(db, uid, pwd, 'res.partner', 'search', [[('is_company', '=', True)]])
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))
partner_id = models.execute_kw(db, uid, pwd, 'res.partner', 'write', [[id], vals])
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))
partner_id = models.execute_kw(db, uid, pwd, 'res.partner', 'create', [vals])
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))
partner_id = models.execute_kw(db, uid, pwd, 'res.partner', 'unlink', [[id]])
Odoo AR 🇦🇷
- Instalación Odoo Community
- Instalación Odoo Enterprise
- Instalación Odoo en Docker
- Instalación de un Módulo de Odoo
- Optimización NGINX
- Optimización PostgreSQL
- Idioma del Servidor (Debian)
- Solución a Errores Comunes
- Solución a Errores en Desarrollo
- Solución a Errores con AFIP