diff --git a/trytond/trytond/commandline.py b/trytond/trytond/commandline.py index 07e0961d6a..db8343848a 100644 --- a/trytond/trytond/commandline.py +++ b/trytond/trytond/commandline.py @@ -108,7 +108,8 @@ def get_parser_admin(): metavar='MODULE', help="activate or update modules").completer = module_completer parser.add_argument( - "--indexes", dest="indexes", action=argparse.BooleanOptionalAction, + "--indexes", dest="indexes", + action=getattr(argparse, 'BooleanOptionalAction', 'store_true'), default=None, help="update indexes") parser.add_argument("--all", dest="update", action="append_const", const="ir", help="update all activated modules")