[IMP]Odoo scripts modules : let the admin username be specified
This commit is contained in:
parent
1c5f4c0998
commit
5f7dee21d6
@ -11,6 +11,8 @@ def main():
|
|||||||
parser = common.parser(parser)
|
parser = common.parser(parser)
|
||||||
parser.add_argument('-db', '--database', type=str, required=True,
|
parser.add_argument('-db', '--database', type=str, required=True,
|
||||||
help='the targetted database')
|
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,
|
parser.add_argument('-dbpw', '--database-password', type=str,
|
||||||
required=True,
|
required=True,
|
||||||
help='the odoo database admin password')
|
help='the odoo database admin password')
|
||||||
@ -26,7 +28,7 @@ def main():
|
|||||||
|
|
||||||
# Connection
|
# Connection
|
||||||
odoo = common.connection(args)
|
odoo = common.connection(args)
|
||||||
odoo.login(args.database, 'admin', args.database_password)
|
odoo.login(args.database, args.database_user, args.database_password)
|
||||||
|
|
||||||
# Modules actions
|
# Modules actions
|
||||||
Module = odoo.env['ir.module.module']
|
Module = odoo.env['ir.module.module']
|
||||||
|
Loading…
Reference in New Issue
Block a user