ufload3 2.1__tar.gz → 2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ufload3-2.1/ufload3.egg-info → ufload3-2.2}/PKG-INFO +1 -1
- {ufload3-2.1 → ufload3-2.2}/ufload3/__init__.py +1 -1
- {ufload3-2.1 → ufload3-2.2}/ufload3/cli/main.py +0 -3
- {ufload3-2.1 → ufload3-2.2}/ufload3/cloud.py +4 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3/db.py +30 -7
- {ufload3-2.1 → ufload3-2.2/ufload3.egg-info}/PKG-INFO +1 -1
- {ufload3-2.1 → ufload3-2.2}/LICENSE +0 -0
- {ufload3-2.1 → ufload3-2.2}/README.md +0 -0
- {ufload3-2.1 → ufload3-2.2}/pyproject.toml +0 -0
- {ufload3-2.1 → ufload3-2.2}/setup.cfg +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3/cli/__init__.py +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3/cli/test_main.py +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3/test_cloud.py +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3/test_db.py +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3/webdav.py +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3.egg-info/SOURCES.txt +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3.egg-info/dependency_links.txt +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3.egg-info/entry_points.txt +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3.egg-info/requires.txt +0 -0
- {ufload3-2.1 → ufload3-2.2}/ufload3.egg-info/top_level.txt +0 -0
|
@@ -494,9 +494,6 @@ def _cmdLs(args):
|
|
|
494
494
|
ufload3.progress('Argument --cert-content or --cert-path is required for this sub-command.')
|
|
495
495
|
return 2
|
|
496
496
|
|
|
497
|
-
if args.cert_path:
|
|
498
|
-
with open(args.cert_path, 'r') as c:
|
|
499
|
-
args.cert_content = c.read()
|
|
500
497
|
|
|
501
498
|
|
|
502
499
|
if args.subdir is None:
|
|
@@ -64,6 +64,10 @@ def get_cloud_info(args, sub_dir=''):
|
|
|
64
64
|
except:
|
|
65
65
|
#The argument cloudpath is not defined, forget about it (this is not the upgrade process)
|
|
66
66
|
pass
|
|
67
|
+
|
|
68
|
+
if args.cert_path:
|
|
69
|
+
with open(args.cert_path, 'r') as c:
|
|
70
|
+
args.cert_content = c.read()
|
|
67
71
|
|
|
68
72
|
ret = {
|
|
69
73
|
'url': args.cloud_url,
|
|
@@ -361,7 +361,7 @@ def instantiate(args, db):
|
|
|
361
361
|
connection = transport.make_connection(host)
|
|
362
362
|
connection.timeout = 4
|
|
363
363
|
sock = xmlrpc.client.ServerProxy('http://%s:%s/xmlrpc/common' % (host, port), transport=transport)
|
|
364
|
-
|
|
364
|
+
sock.login(db, args.adminuser.lower(), args.adminpw)
|
|
365
365
|
except Exception as e:
|
|
366
366
|
ufload3.progress("non blocking error at first connection %s" % e)
|
|
367
367
|
|
|
@@ -498,8 +498,8 @@ def delive(args, db):
|
|
|
498
498
|
if args.db_prefix:
|
|
499
499
|
db_name = db_name.split(args.db_prefix+'_', 1)[1]
|
|
500
500
|
new_pass_dict = []
|
|
501
|
-
for pass_part in re.split(
|
|
502
|
-
m = re.search('\[(\d+)\+(\d+)\]', pass_part)
|
|
501
|
+
for pass_part in re.split(r'(\[\d+\+\d+\])', args.newuserspw):
|
|
502
|
+
m = re.search(r'\[(\d+)\+(\d+)\]', pass_part)
|
|
503
503
|
if m:
|
|
504
504
|
pos = int(m.group(1)) - 1
|
|
505
505
|
add = int(m.group(2))
|
|
@@ -511,7 +511,17 @@ def delive(args, db):
|
|
|
511
511
|
|
|
512
512
|
for new_user_info in args.createusers.split(';'):
|
|
513
513
|
new_user_data = new_user_info.split(':')
|
|
514
|
-
|
|
514
|
+
new_user_dpt = False
|
|
515
|
+
new_user_name = False
|
|
516
|
+
new_user_email = False
|
|
517
|
+
if len(new_user_data) == 6:
|
|
518
|
+
new_user = new_user_data[0]
|
|
519
|
+
new_user_name = new_user_data[1]
|
|
520
|
+
new_user_email = new_user_data[2]
|
|
521
|
+
new_user_dpt = new_user_data[3]
|
|
522
|
+
new_user_pass = new_user_data[4]
|
|
523
|
+
groups = new_user_data[5]
|
|
524
|
+
elif len(new_user_data) == 3:
|
|
515
525
|
new_user= new_user_data[0]
|
|
516
526
|
new_user_pass = new_user_data[1]
|
|
517
527
|
groups = new_user_data[2]
|
|
@@ -519,12 +529,25 @@ def delive(args, db):
|
|
|
519
529
|
new_user= new_user_data[0]
|
|
520
530
|
new_user_pass = newpass
|
|
521
531
|
groups = new_user_data[1]
|
|
532
|
+
|
|
533
|
+
if not new_user_name:
|
|
534
|
+
new_user_name = new_user
|
|
522
535
|
rc, new_userid = psql(args, """ insert into res_users (name, active, login, password, context_lang, company_id, view, menu_id) values
|
|
523
536
|
('%s', 't', '%s', '%s', 'en_MF', 1, 'simple', 1) returning id;"""
|
|
524
|
-
% (
|
|
537
|
+
% (new_user_name, new_user.lower(), new_user_pass), db, silent=True)
|
|
525
538
|
if rc != 0:
|
|
526
539
|
return rc
|
|
527
|
-
|
|
540
|
+
if new_user_dpt:
|
|
541
|
+
psql(args, """ update res_users u set context_department_id = d.id
|
|
542
|
+
from hr_department d
|
|
543
|
+
where d.name = '%s' and u.id = %s """ % (new_user_dpt, new_userid), db)
|
|
544
|
+
|
|
545
|
+
if new_user_email:
|
|
546
|
+
rc, address_id = psql(args, """ insert into res_partner_address (name, email) values ('%s', '%s') returning id """ % (new_user_name, new_user_email), db, silent=True)
|
|
547
|
+
if address_id:
|
|
548
|
+
psql(args,"update res_users set address_id=%s where id=%s" % (address_id, new_userid), db)
|
|
549
|
+
|
|
550
|
+
for new_group in groups.split(','):
|
|
528
551
|
rc = psql(args, " insert into res_groups_users_rel (uid, gid) (select %s, id from res_groups where name='%s');" % (new_userid, new_group), db)
|
|
529
552
|
if rc != 0:
|
|
530
553
|
return rc
|
|
@@ -608,7 +631,7 @@ def get_hwid(args):
|
|
|
608
631
|
import winreg
|
|
609
632
|
try:
|
|
610
633
|
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,
|
|
611
|
-
"SYSTEM\ControlSet001\services\eventlog\Application\openerp-web-6.0",
|
|
634
|
+
r"SYSTEM\ControlSet001\services\eventlog\Application\openerp-web-6.0",
|
|
612
635
|
0, winreg.KEY_READ) as registry_key:
|
|
613
636
|
hwid, regtype = winreg.QueryValueEx(registry_key, "HardwareId")
|
|
614
637
|
ufload3.progress("Hardware id from registry key: %s" % hwid)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|