OCA / odoorpc

Python module to pilot your Odoo servers through JSON-RPC.
http://pythonhosted.org/OdooRPC/
GNU Lesser General Public License v3.0
231 stars 123 forks source link

Update db.py - add parameters #91

Open kavichu opened 11 months ago

kavichu commented 11 months ago

Add login, country_code, phone parameters to allow users to configure these parameters during database creation.

I read file and function exp_create_database

@check_db_management_enabled
def exp_create_database(db_name, demo, lang, user_password='admin', login='admin', country_code=None, phone=None):
    """ Similar to exp_create but blocking."""
    _logger.info('Create database `%s`.', db_name)
    _create_empty_database(db_name)
    _initialize_db(id, db_name, demo, lang, user_password, login, country_code, phone)
    return True

I saw that there is a way to send more useful parameters when calling DB.create