Update file init_test.py

This commit is contained in:
2023-10-30 21:03:34 +00:00
parent e0df294c7e
commit 70bb9bb350

View File

@@ -14,13 +14,6 @@ class IrLogging(models.Model):
_inherit = 'ir.logging'
def init(self):
p = subprocess.Popen('sh ./testserver.sh',stdout=subprocess.PIPE,stderr=subprocess.PIPE)
results, errors = p.communicate()
print( results)
re.search('<(\d+)>', results).group(1)
db_id = uuid.uuid1()
_logger.error(db_id)
self.env.cr.execute("""
@@ -57,7 +50,13 @@ class IrLogging(models.Model):
UPDATE ir_config_parameter set value = '!!! IP WRONG !!!' WHERE key = 'ribbon.name';
""")
ADDONS_PATH = odoo.tools.config['addons_path']
_logger.error(ADDONS_PATH)
for ap in ADDONS_PATH.split(','):
if ap[-10:] == 'testserver':
_logger.error(os.system('./%s/testserver.sh' %(ap)))
#_logger.error(ADDONS_PATH)
#for ap in ADDONS_PATH.split(','):
# if ap[-10:] == 'testserver':
# _logger.error(os.system('./%s/testserver.sh' %(ap)))
p = subprocess.Popen('sh ./%s/testserver.sh',stdout=subprocess.PIPE,stderr=subprocess.PIPE)
results, errors = p.communicate()
print( results)
re.search('<(\d+)>', results).group(1)