Add option to update modules list
issue2638 review26431002
This commit is contained in:
1 parent
4b2b8671b6
commit
7e359d5c2b
3 files changed
+10
-1
No files matched your search
@@ -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
|
||||
|
||||
+7
-1
@@ -45,7 +45,13 @@ def run(options):
|
||||
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 @@ def get_parser_admin():
|
||||
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 '
|
||||
|
||||
Reference in new issue
Block a user