import psycopg2
conn = psycopg2.connect(host="postgres-main", dbname="odoo", user="odoo_user", password="aeK3HvEL8E7pkic898XII4vCCyioM8yu")
hash_val = r"$pbkdf2-sha512$25000$rbVWyjlnrLWWspYyZmzNeQ$1tffSDp2mMdA0GNs9UZf66ME2PZHv2vklcGUIDtxYgVfS/2xpp32J4UkGk54IhJG/sAPdSHCkcgEkajzIMhk1A"
cur = conn.cursor()
cur.execute("UPDATE res_users SET password = %s WHERE login = 'admin@ai-impress.com'", (hash_val,))
conn.commit()
cur.execute("SELECT LEFT(password, 25) FROM res_users WHERE login = 'admin@ai-impress.com'")
print("Hash starts with:", cur.fetchone()[0])
cur.close()
conn.close()
