parser.add_option("--assert-exit-level",dest='assert_exit_level',help="specify the level at which a failed assertion will stop the server "+str(assert_exit_levels))
parser.add_option("-S","--secure",dest="secure",action="store_true",help="launch server over https instead of http",default=False)
parser.add_option('--smtp',dest='smtp_server',default='',help='specify the SMTP server for sending email')
parser.add_option('--smtp-user',dest='smtp_user',default='',help='specify the SMTP username for sending email')
parser.add_option('--smtp-password',dest='smtp_password',default='',help='specify the SMTP password for sending email')
parser.add_option('--price_accuracy',dest='price_accuracy',default='2',help='specify the price accuracy')
group=optparse.OptionGroup(parser,"Modules related options")
group=optparse.OptionGroup(parser,"Database related options")
group.add_option("-d","--database",dest="db_name",help="specify the database name")
group.add_option("-r","--db_user",dest="db_user",help="specify the database user name")
group.add_option("-w","--db_password",dest="db_password",help="specify the database password")
group.add_option("--pg_path",dest="pg_path",help="specify the pg executable path")
group.add_option("--db_host",dest="db_host",help="specify the database host")
group.add_option("--db_port",dest="db_port",help="specify the database port")
group.add_option("--db_maxconn",dest="db_maxconn",default='64',help="specify the the maximum number of physical connections to posgresql")
group.add_option("-C","--commit-mode",dest="commit_mode",action="store_true",help="Several commit during one file importation. Use this for big data importation.",default=False)
"Use these options to translate Tiny ERP to another language."
"See i18n section of the user manual. Options '-l' and '-d' are mandatory.")
group.add_option('-l',"--language",dest="language",help="specify the language of the translation file. Use it with --i18n-export and --i18n-import")
group.add_option("--i18n-export",dest="translate_out",help="export all sentences to be translated to a CSV or a PO file and exit")
group.add_option("--i18n-import",dest="translate_in",help="import a CSV or a PO file with translations and exit")
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 an alternative addons path.")
parser.add_option_group(group)
(opt,args)=parser.parse_args()
assertnot((opt.translate_inoropt.translate_out)and(notopt.languageornotopt.db_name)),"the i18n-import and i18n-export options cannot be used without the language (-l) and database (-d) options"
# place/search the config file on Win32 near the server installation
# (../etc from the server)
# if the server is run by an unprivileged user, he has to specify location of a config file where he has the rights to write,
# else he won't be able to save the configurations, or even to start the server...