# Not exposed in the configuration file.
self.blacklist_for_save = set(
['publisher_warranty_url', 'load_language', 'root_path',
- 'init', 'save', 'config', 'update'])
+ 'init', 'save', 'config', 'update', 'stop_after_init'])
# dictionary mapping option destination (keys in self.options) to MyOptions.
self.casts = {}
group.add_option("-P", "--import-partial", dest="import_partial", my_default='',
help="Use this for big data importation, if it crashes you will be able to continue at the current state. Provide a filename to store intermediate importation states.")
group.add_option("--pidfile", dest="pidfile", help="file where the server pid will be stored")
- group.add_option("--load", dest="server_wide_modules", help="Comma-separated list of server-wide modules")
+ group.add_option("--addons-path", dest="addons_path",
+ help="specify additional addons paths (separated by commas).",
+ action="callback", callback=self._check_addons_path, nargs=1, type="string")
+ group.add_option("--load", dest="server_wide_modules", help="Comma-separated list of server-wide modules default=web")
parser.add_option_group(group)
# XML-RPC / HTTP
help="disable the NETRPC protocol")
parser.add_option_group(group)
+ # WEB
+ # TODO move to web addons after MetaOption merge
+ group = optparse.OptionGroup(parser, "Web interface Configuration")
+ group.add_option("--db-filter", dest="dbfilter", default='.*',
+ help="Filter listed database", metavar="REGEXP")
+ parser.add_option_group(group)
+
# Static HTTP
group = optparse.OptionGroup(parser, "Static HTTP service")
group.add_option("--static-http-enable", dest="static_http_enable", action="store_true", my_default=False, help="enable static HTTP service for serving plain HTML files")
help="overwrites existing translation terms on updating a module or importing a CSV or a PO file.")
group.add_option("--modules", dest="translate_modules",
help="specify modules to export. Use in combination with --i18n-export")
- group.add_option("--addons-path", dest="addons_path",
- help="specify additional addons paths (separated by commas).",
- action="callback", callback=self._check_addons_path, nargs=1, type="string")
parser.add_option_group(group)
security = optparse.OptionGroup(parser, 'Security-related options')
"osv_memory tables. This is a decimal value expressed in hours, "
"and the default is 1 hour.",
type="float")
+ group.add_option("--max-cron-threads", dest="max_cron_threads", my_default=4,
+ help="Maximum number of threads processing concurrently cron jobs.",
+ type="int")
+ group.add_option("--unaccent", dest="unaccent", my_default=False, action="store_true",
+ help="Use the unaccent function provided by the database when available.")
+
parser.add_option_group(group)
# Copy all optparse options (i.e. MyOption) into self.options.
'netrpc_interface', 'netrpc_port', 'db_maxconn', 'import_partial', 'addons_path',
'netrpc', 'xmlrpc', 'syslog', 'without_demo', 'timezone',
'xmlrpcs_interface', 'xmlrpcs_port', 'xmlrpcs',
- 'secure_cert_file', 'secure_pkey_file',
- 'static_http_enable', 'static_http_document_root', 'static_http_url_prefix'
+ 'static_http_enable', 'static_http_document_root', 'static_http_url_prefix',
+ 'secure_cert_file', 'secure_pkey_file', 'dbfilter'
]
for arg in keys:
'stop_after_init', 'logrotate', 'without_demo', 'netrpc', 'xmlrpc', 'syslog',
'list_db', 'xmlrpcs',
'test_file', 'test_disable', 'test_commit', 'test_report_directory',
- 'osv_memory_count_limit', 'osv_memory_age_limit',
+ 'osv_memory_count_limit', 'osv_memory_age_limit', 'max_cron_threads', 'unaccent',
]
for arg in keys:
if opt.save:
self.save()
+ openerp.conf.max_cron_threads = self.options['max_cron_threads']
+
openerp.conf.addons_paths = self.options['addons_path'].split(',')
- openerp.conf.server_wide_modules = \
- map(lambda m: m.strip(), opt.server_wide_modules.split(',')) if \
- opt.server_wide_modules else []
+ if opt.server_wide_modules:
+ openerp.conf.server_wide_modules = map(lambda m: m.strip(), opt.server_wide_modules.split(','))
+ else:
+ openerp.conf.server_wide_modules = ['web']
if complete:
openerp.modules.module.initialize_sys_path()
openerp.modules.loading.open_openerp_namespace()
- # openerp.addons.__path__.extend(openerp.conf.addons_paths) # This
- # is not compatible with initialize_sys_path(): import crm and
- # import openerp.addons.crm load twice the module.
def _generate_pgpassfile(self):
"""
p.set('options', opt, self.options[opt])
for sec in sorted(self.misc.keys()):
+ p.add_section(sec)
for opt in sorted(self.misc[sec].keys()):
p.set(sec,opt,self.misc[sec][opt])
config = configmanager()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: