My question is how can I get the name of the database, where I am accessing, by python code.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
5798
Views
Hi Michael,
You can actually get the data from the Odoo cursor. New API:
db_name = self._cr.dbname
Old API:
db_name = cr.dbname
db_name will then contain the name of your database.
Regards,
Yenthe
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up