13 lines
353 B
Python
13 lines
353 B
Python
import odoorpc
|
|
|
|
# Connect to Odoo server
|
|
odoo = odoorpc.ODOO("workspace.local", port=8069)
|
|
odoo.login("ambio", "admin", "admin")
|
|
|
|
# Query ir.model to get all model names (tables)
|
|
models = odoo.env["ir.model"].search_read([], ["model"])
|
|
|
|
# Extract and print model names (table names)
|
|
table_names = [model["model"] for model in models]
|
|
print(table_names)
|