[IMP]Odoo scripts modules : let the admin username be specified

This commit is contained in:
Fabien Bourgeois 2016-10-18 12:51:28 +02:00
parent 1c5f4c0998
commit 5f7dee21d6

View File

@ -11,6 +11,8 @@ def main():
parser = common.parser(parser)
parser.add_argument('-db', '--database', type=str, required=True,
help='the targetted database')
parser.add_argument('-dbu', '--database-user', type=str, default='admin',
help='the odoo database admin username')
parser.add_argument('-dbpw', '--database-password', type=str,
required=True,
help='the odoo database admin password')
@ -26,7 +28,7 @@ def main():
# Connection
odoo = common.connection(args)
odoo.login(args.database, 'admin', args.database_password)
odoo.login(args.database, args.database_user, args.database_password)
# Modules actions
Module = odoo.env['ir.module.module']