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
23 command_list_server = (conf, cron, drop, initialize, model, module, read, run_tests,
24 scaffold, uninstall, update, web, )
26 command_list_client = (Call, Open, Show, ConsumeNothing, ConsumeMemory,
27 LeakMemory, ConsumeCPU, Bench, BenchRead,
28 BenchFieldsViewGet, BenchDummy, BenchLogin,
32 parser = argparse.ArgumentParser(
33 usage=argparse.SUPPRESS,
34 description=textwrap.fill(textwrap.dedent("""\
35 OpenERP Command provides a set of command-line tools around
36 the OpenERP framework: openobject-server. All the tools are
37 sub-commands of a single oe executable.""")),
38 epilog="""Use <command> --help to get information about the command.""",
39 formatter_class=argparse.RawDescriptionHelpFormatter,
42 for x in command_list_server:
43 description.append(x.__name__[len(__package__)+1:])
47 textwrap.fill(str(x.__doc__).strip(),
48 subsequent_indent=' ',
51 description.append("\n\n")
52 subparsers = parser.add_subparsers(
53 title="Available commands",
54 help=argparse.SUPPRESS,
55 description="".join(description[:-1]),
57 # Server-side commands.
58 for x in command_list_server:
59 x.add_parser(subparsers)
60 # Client-side commands. TODO one per .py file.
61 for x in command_list_client: