- Custom modules: hazard_shopify, hazard_inventory_report, hazard_website - Third-party modules: bi_sql_editor, query_deluxe, sql_request_abstract, l10n_mx_sat_sync_itadmin_ee - Docker setup: Odoo 16 + PostgreSQL 17 - Utility scripts: backup_hazard.sh, update_module.py - Agent configuration: .agents/AGENTS.md - Security: Enterprise modules, credentials, backups and production data excluded via .gitignore
24 lines
807 B
Python
24 lines
807 B
Python
import xmlrpc.client
|
|
|
|
url = 'http://localhost:16001'
|
|
db = 'hazard_new'
|
|
username = 'admin'
|
|
password = '123'
|
|
|
|
try:
|
|
common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(url))
|
|
uid = common.authenticate(db, username, 'admin', {})
|
|
|
|
models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(url))
|
|
|
|
# 4. Verificar Ubicación de Subcontratación
|
|
locations = models.execute_kw(db, uid, 'admin', 'stock.location', 'search_read',
|
|
[['|', ['name', 'ilike', 'Subcontrataci'], ['name', 'ilike', 'Subcontract']]],
|
|
{'fields': ['name', 'usage', 'complete_name']})
|
|
print("\nUbicaciones de Subcontratación encontradas:")
|
|
for loc in locations:
|
|
print(f" - {loc['complete_name']} (Usage: {loc['usage']})")
|
|
|
|
except Exception as e:
|
|
print("Error:", e)
|