def add_parser(subparsers): parser = subparsers.add_parser('initialize', description='Create and initialize a new OpenERP database.') parser.add_argument('-d', '--database', metavar='DATABASE', **common.required_or_default('DATABASE', 'the database to create')) common.add_addons_argument(parser) parser.add_argument('-P', '--port', metavar='PORT', **common.required_or_default('PORT', 'the server port')) parser.add_argument('--module', metavar='MODULE', action='append', help='specify a module to install' ' (this option can be repeated)') parser.add_argument('--all-modules', action='store_true', help='install all visible modules (not compatible with --module)') parser.add_argument('--no-create', action='store_true', help='do not create the database, only initialize it') parser.add_argument('--exclude', metavar='MODULE', action='append', help='exclude a module from installation' ' (this option can be repeated)') parser.add_argument('--tests', action='store_true', help='run the tests as modules are installed' ' (use the `run-tests` command to choose specific' ' tests to run against an existing database).' ' Demo data are installed.') parser.add_argument('--coverage', action='store_true', help='report code coverage (particularly useful with --tests).' ' The report is generated in a coverage directory and you can' ' then point your browser to coverage/index.html.') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser( 'grunt-tests', description='Run the tests contained in Gruntfile.js files.') common.add_addons_argument(parser) parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('read', description='Display a record.') parser.add_argument('-d', '--database', metavar='DATABASE', **common.required_or_default( 'DATABASE', 'the database to connect to')) common.add_addons_argument(parser) parser.add_argument('-m', '--model', metavar='MODEL', required=True, help='the model for which a record should be read') parser.add_argument('-i', '--id', metavar='RECORDID', required=True, help='the record id') parser.add_argument('-v', '--verbose', action='store_true', help='display more information') parser.add_argument('--short', action='store_true', help='display less information') parser.add_argument( '-f', '--field', metavar='FIELD', help='display information only for this particular field') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser( 'web', description='Run a normal OpenERP HTTP process. By default a ' 'singly-threaded Werkzeug server is used.') common.add_addons_argument(parser) parser.add_argument( '--interface', default='0.0.0.0', help='HTTP interface to listen on (default is %(default)s)') parser.add_argument('--port', metavar='INT', default=8069, help='HTTP port to listen on (default is %(default)s)') parser.add_argument( '--threaded', action='store_true', help='Use a multithreaded Werkzeug server (incompatible with --gevent)' ) parser.add_argument( '--gevent', action='store_true', help="Use gevent's WSGI server (incompatible with --threaded)") parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('initialize', description='Create and initialize a new OpenERP database.') parser.add_argument('-d', '--database', metavar='DATABASE', **common.required_or_default('DATABASE', 'the database to create')) common.add_addons_argument(parser) parser.add_argument('--module', metavar='MODULE', action='append', help='specify a module to install' ' (this option can be repeated)') parser.add_argument('--all-modules', action='store_true', help='install all visible modules (not compatible with --module)') parser.add_argument('--no-create', action='store_true', help='do not create the database, only initialize it') parser.add_argument('--exclude', metavar='MODULE', action='append', help='exclude a module from installation' ' (this option can be repeated)') parser.add_argument('--tests', action='store_true', help='run the tests as modules are installed' ' (use the `run-tests` command to choose specific' ' tests to run against an existing database).' ' Demo data are installed.') parser.add_argument('--coverage', action='store_true', help='report code coverage (particularly useful with --tests).' ' The report is generated in a coverage directory and you can' ' then point your browser to coverage/index.html.') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('run-tests', description='Run the OpenERP server and/or addons tests.') parser.add_argument('-d', '--database', metavar='DATABASE', required=True, help='the database to test. Depending on the test suites, the ' 'database must already exist or not.') parser.add_argument('-p', '--port', metavar='PORT', help='the port used for WML-RPC tests') common.add_addons_argument(parser) parser.add_argument('-m', '--module', metavar='MODULE', default=None, help='the module to test in `module[.submodule]` notation. ' 'Use `openerp` for the core OpenERP tests. ' 'Leave empty to run every declared tests. ' 'Give a module but no submodule to run all the module\'s declared ' 'tests. If both the module and the submodule are given, ' 'the sub-module can be run even if it is not declared in the module.') parser.add_argument('--fast-suite', action='store_true', help='run only the tests explicitely declared in the fast suite (this ' 'makes sense only with the bare `module` notation or no module at ' 'all).') parser.add_argument('--sanity-checks', action='store_true', help='run only the sanity check tests') parser.add_argument('--dry-run', action='store_true', help='do not run the tests') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('run-tests', description='Run the OpenERP server and/or addons tests.') parser.add_argument('-d', '--database', metavar='DATABASE', required=True, help='the database to test. Depending on the test suites, the ' 'database must already exist or not.') common.add_addons_argument(parser) parser.add_argument('-m', '--module', metavar='MODULE', default=None, help='the module to test in `module[.submodule]` notation. ' 'Use `openerp` for the core OpenERP tests. ' 'Leave empty to run every declared tests. ' 'Give a module but no submodule to run all the module\'s declared ' 'tests. If both the module and the submodule are given, ' 'the sub-module can be run even if it is not declared in the module.') parser.add_argument('--fast-suite', action='store_true', help='run only the tests explicitely declared in the fast suite (this ' 'makes sense only with the bare `module` notation or no module at ' 'all).') parser.add_argument('--sanity-checks', action='store_true', help='run only the sanity check tests') parser.add_argument('--dry-run', action='store_true', help='do not run the tests') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('cron', description='Run an OpenERP cron process.') common.add_addons_argument(parser) parser.add_argument('--database', action='append', help='Database for which cron jobs are processed (can be repeated)') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser("cron", description="Run an OpenERP cron process.") common.add_addons_argument(parser) parser.add_argument( "--database", action="append", help="Database for which cron jobs are processed (can be repeated)" ) parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser( 'run-tests', description='Run the OpenERP server and/or addons tests.') parser.add_argument( '-d', '--database', metavar='DATABASE', required=True, help='the database to test. Depending on the test suites, the ' 'database must already exist or not.') parser.add_argument('-p', '--port', metavar='PORT', help='the port used for WML-RPC tests') common.add_addons_argument(parser) parser.add_argument( '-m', '--module', metavar='MODULE', action=ModuleAction, default=None, help="the module to test in `module[.submodule]` notation. " "Use `openerp` for the core OpenERP tests. " "Leave empty to run every declared tests. " "Give a module but no submodule to run all the module's declared " "tests. If both the module and the submodule are given, " "the sub-module can be run even if it is not declared in the module.") group = parser.add_mutually_exclusive_group() group.add_argument( '--fast-suite', dest='submodule', action=GuardAction, nargs=0, const='__fast_suite__', help='run only the tests explicitly declared in the fast suite (this ' 'makes sense only with the bare `module` notation or no module at ' 'all).') group.add_argument('--sanity-checks', dest='submodule', action=GuardAction, nargs=0, const='__sanity_checks__', help='run only the sanity check tests') group.add_argument( '--slow-suite', dest='submodule', action=GuardAction, nargs=0, const='__slow_suite__', help="Only run slow tests (tests which are neither in the fast nor in" " the sanity suite)") parser.add_argument('--dry-run', action='store_true', help='do not run the tests') parser.set_defaults(run=run, submodule=None)
def add_parser(subparsers): parser = subparsers.add_parser('cron', description='Run an OpenERP cron process.') common.add_addons_argument(parser) parser.add_argument( '--database', action='append', help='Database for which cron jobs are processed (can be repeated)') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('uninstall', description='Uninstall some modules from an OpenERP database.') parser.add_argument('-d', '--database', metavar='DATABASE', **common.required_or_default('DATABASE', 'the database to modify')) common.add_addons_argument(parser) parser.add_argument('--module', metavar='MODULE', action='append', help='specify a module to uninstall' ' (this option can be repeated)') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('web', description='Run a normal OpenERP HTTP process. By default a ' 'singly-threaded Werkzeug server is used.') common.add_addons_argument(parser) parser.add_argument('--interface', default='0.0.0.0', help='HTTP interface to listen on (default is %(default)s)') parser.add_argument('--port', metavar='INT', default=8069, help='HTTP port to listen on (default is %(default)s)') parser.add_argument('--threaded', action='store_true', help='Use a multithreaded Werkzeug server (incompatible with --gevent)') parser.add_argument('--gevent', action='store_true', help="Use gevent's WSGI server (incompatible with --threaded)") parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('read', description='Display a record.') parser.add_argument('-d', '--database', metavar='DATABASE', **common.required_or_default('DATABASE', 'the database to connect to')) common.add_addons_argument(parser) parser.add_argument('-m', '--model', metavar='MODEL', required=True, help='the model for which a record should be read') parser.add_argument('-i', '--id', metavar='RECORDID', required=True, help='the record id') parser.add_argument('-v', '--verbose', action='store_true', help='display more information') parser.add_argument('--short', action='store_true', help='display less information') parser.add_argument('-f', '--field', metavar='FIELD', help='display information only for this particular field') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('initialize', description='Create and initialize a new OpenERP database.') parser.add_argument('-d', '--database', metavar='DATABASE', **common.required_or_default('DATABASE', 'the database to create')) common.add_addons_argument(parser) parser.add_argument('--module', metavar='MODULE', action='append', help='specify a module to install' ' (this option can be repeated)') parser.add_argument('--all-modules', action='store_true', help='install all visible modules (not compatible with --module)') parser.add_argument('--no-create', action='store_true', help='do not create the database, only initialize it') parser.add_argument('--exclude', metavar='MODULE', action='append', help='exclude a module from installation' ' (this option can be repeated)') parser.set_defaults(run=run)
def add_parser(subparsers): parser = subparsers.add_parser('run-tests', description='Run the OpenERP server and/or addons tests.') parser.add_argument('-d', '--database', metavar='DATABASE', required=True, help='the database to test. Depending on the test suites, the ' 'database must already exist or not.') parser.add_argument('-p', '--port', metavar='PORT', help='the port used for WML-RPC tests') common.add_addons_argument(parser) parser.add_argument( '-m', '--module', metavar='MODULE', action=ModuleAction, default=None, help="the module to test in `module[.submodule]` notation. " "Use `openerp` for the core OpenERP tests. " "Leave empty to run every declared tests. " "Give a module but no submodule to run all the module's declared " "tests. If both the module and the submodule are given, " "the sub-module can be run even if it is not declared in the module.") group = parser.add_mutually_exclusive_group() group.add_argument( '--fast-suite', dest='submodule', action=GuardAction, nargs=0, const='__fast_suite__', help='run only the tests explicitly declared in the fast suite (this ' 'makes sense only with the bare `module` notation or no module at ' 'all).') group.add_argument( '--sanity-checks', dest='submodule', action=GuardAction, nargs=0, const='__sanity_checks__', help='run only the sanity check tests') group.add_argument( '--slow-suite', dest='submodule', action=GuardAction, nargs=0, const='__slow_suite__', help="Only run slow tests (tests which are neither in the fast nor in" " the sanity suite)") parser.add_argument('--dry-run', action='store_true', help='do not run the tests') parser.set_defaults(run=run, submodule=None)
def add_parser(subparsers): parser = subparsers.add_parser('grunt-tests', description='Run the tests contained in Gruntfile.js files.') common.add_addons_argument(parser) parser.set_defaults(run=run)