🎉 Initial commit - Hazard Odoo 16 project
- 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
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import xmlrpc.client
|
||||
|
||||
url = 'http://localhost:16001'
|
||||
db = 'hazard_new'
|
||||
username = 'admin'
|
||||
password = '123'
|
||||
|
||||
common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(url))
|
||||
uid = common.authenticate(db, username, 'admin', {})
|
||||
if not uid: uid = common.authenticate(db, 'admin', '123', {})
|
||||
|
||||
models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(url))
|
||||
ref = 'HRS-GLV-CABRET-U-WHT-L'
|
||||
|
||||
for lang in ['en_US', 'es_MX', 'es_ES']:
|
||||
products = models.execute_kw(db, uid, 'admin', 'product.product', 'search_read',
|
||||
[[['default_code', '=', ref]]],
|
||||
{'fields': ['id', 'name', 'display_name'], 'context': {'lang': lang}})
|
||||
if products:
|
||||
print(f"Lang {lang}: {products[0]['name']}")
|
||||
|
||||
moves = models.execute_kw(db, uid, 'admin', 'stock.move', 'search_read',
|
||||
[[['product_id', '=', products[0]['id']]]],
|
||||
{'fields': ['id', 'name', 'description_picking'], 'limit': 1, 'order': 'id desc'})
|
||||
if moves:
|
||||
print(f"Move Lang {lang}: {moves[0]['description_picking']}")
|
||||
Reference in New Issue
Block a user