Odoo18-Base/setup/get_table.py
KaySar12 76590cba19
Some checks are pending
Setup Native Action / native (3.12.7) (push) Waiting to run
Setup Native Action / docker (3.12.7) (push) Waiting to run
update
2025-03-25 10:41:54 +07:00

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)