Skip to content
Snippets Groups Projects
Commit 2ec548fc4fbb authored by Xavier Codinas's avatar Xavier Codinas
Browse files

Add option to update modules list

issue2638
review26431002
parent e11df51790ba
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
* Remove string attribute from views
* Don't check write access on model for button with groups
* Limit readonly state for xxx2Many
* Add option to update modules list with trytond-admin
* Use home directory as default path for database and web root.
* Add count option on Action Window Domains
* Remove window_name on Action Window
......
......@@ -45,7 +45,13 @@
lang = [x[0] for x in cursor.fetchall()]
else:
lang = None
Pool(db_name).init(update=options.update, lang=lang)
pool = Pool(db_name)
pool.init(update=options.update, lang=lang)
if options.update_modules_list:
with Transaction().start(db_name, 0) as transaction:
Module = pool.get('ir.module')
Module.update_list()
for db_name in options.database_names:
if init[db_name]:
......
......@@ -46,6 +46,8 @@
metavar='MODULE', help="update a module")
parser.add_argument("--all", dest="update", action="append_const",
const="ir", help="update all installed modules")
parser.add_argument("-m", "--update-modules-list", action="store_true",
dest="update_modules_list", help="Update list of tryton modules")
parser.epilog = ('The first time a database is initialized admin '
'password is read from file defined by TRYTONPASSFILE '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment