5 from .client import Open, Show, ConsumeNothing, ConsumeMemory, LeakMemory, ConsumeCPU
6 from .benchmarks import Bench, BenchRead, BenchFieldsViewGet, BenchDummy, BenchLogin
7 from .bench_sale_mrp import BenchSaleMrp
10 from . import conf # Not really server-side (in the `for` below).
13 from . import initialize
17 from . import run_tests
18 from . import scaffold
19 from . import uninstall
22 from . import grunt_tests
24 command_list_server = (conf, cron, drop, initialize, model, module, read, run_tests,
25 scaffold, uninstall, update, web, grunt_tests, )
27 command_list_client = (Call, Open, Show, ConsumeNothing, ConsumeMemory,
28 LeakMemory, ConsumeCPU, Bench, BenchRead,
29 BenchFieldsViewGet, BenchDummy, BenchLogin,
33 parser = argparse.ArgumentParser(
34 usage=argparse.SUPPRESS,
35 description=textwrap.fill(textwrap.dedent("""\
36 OpenERP Command provides a set of command-line tools around
37 the OpenERP framework: openobject-server. All the tools are
38 sub-commands of a single oe executable.""")),
39 epilog="""Use <command> --help to get information about the command.""",
40 formatter_class=argparse.RawDescriptionHelpFormatter,
43 for x in command_list_server:
44 description.append(x.__name__[len(__package__)+1:])
48 textwrap.fill(str(x.__doc__).strip(),
49 subsequent_indent=' ',
52 description.append("\n\n")
53 subparsers = parser.add_subparsers(
54 title="Available commands",
55 help=argparse.SUPPRESS,
56 description="".join(description[:-1]),
58 # Server-side commands.
59 for x in command_list_server:
60 x.add_parser(subparsers)
61 # Client-side commands. TODO one per .py file.
62 for x in command_list_client: