how to create database for a client with code (not with interface) ?
The database contains only the modules chosen by the customer.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
how to create database for a client with code (not with interface) ?
The database contains only the modules chosen by the customer.
Hi Sonia,
This is exactly what ERPpeek is made for (an external Python library). With ERPpeek you could do this in just a few lines of code. For example:
import erppeek DATABASE = 'ErpPeekDemoDatabase' SERVER = 'http://localhost:8080' ADMIN_PASSWORD = 'admin' client = erppeek.Client(server=SERVER) if not DATABASE in client.db.list(): print("The database does not exist yet, creating one!") client.create_database(ADMIN_PASSWORD, DATABASE) else: print("The database " + DATABASE + " already exists."
You can also install modules with ERPpeek:
client = erppeek.Client('http://localhost:8080', 'ErpPeekDemoDatabase', 'admin', 'admin') modules = client.modules('sale', installed=False) if 'sale' in modules['uninstalled']: client.install('sale')
Another way you could do this is by custom development through Python but ERPpeek works fine here and you could already use all the functions that are made, which are very powerful.
I've made some example scripts which you can find here: https://github.com/Yenthe666/Odoo_Samples/tree/master/ErpPeekDemo
Yenthe
Hi yenthe, I am looking for something like that.
In a nutshell, generating instances of odoo for customers based on sub domain with some installed modules.
Is this still up-to-date/ best solution ?
Thanks
Hi Yenthe, is there any way to do it for Odoo 16 ? I would appreciate your help. Thank you!
Hi Yenthe
Thank you so much
No problem! If it helped you please upvote / accept the answer. :)
can you give me your email to contact you,please
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up