details: https://code.tryton.org/tryton/commit/f564c0cc0aea
branch: 7.6
user: Cédric Krier <[email protected]>
date: Fri Nov 28 15:32:06 2025 +0100
description:
Make option --all appends the res module to the list of updates
Since d237ff78d187 the res module is not updated even if it depends on
ir
module because it is an early module.
Closes #14401
(grafted from 31105d04576f39e521a125d443c773d54491bda7)
diffstat:
trytond/trytond/commandline.py | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r aa6e655c7c60 -r f564c0cc0aea trytond/trytond/commandline.py
--- a/trytond/trytond/commandline.py Wed Nov 26 21:34:50 2025 +0100
+++ b/trytond/trytond/commandline.py Fri Nov 28 15:32:06 2025 +0100
@@ -15,6 +15,31 @@
logger = logging.getLogger(__name__)
+class ExtendConstAction(argparse.Action):
+ def __init__(self,
+ option_strings,
+ dest,
+ const=None,
+ default=None,
+ required=False,
+ help=None,
+ metavar=None):
+ super().__init__(
+ option_strings=option_strings,
+ dest=dest,
+ nargs=0,
+ const=const,
+ default=default,
+ required=required,
+ help=help,
+ metavar=metavar)
+
+ def __call__(self, parser, namespace, values, option_sting=None):
+ items = getattr(namespace, self.dest, [])[:]
+ items.extend(self.const)
+ setattr(namespace, self.dest, items)
+
+
def database_completer(parsed_args, **kwargs):
from trytond.config import config
from trytond.transaction import Transaction
@@ -119,8 +144,8 @@
"--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")
+ parser.add_argument("--all", dest="update", action=ExtendConstAction,
+ const=['ir', 'res'], help="update all activated modules")
parser.add_argument("--activate-dependencies", dest="activatedeps",
action="store_true",
help="activate missing dependencies of updated modules")