Update file init_test.py
This commit is contained in:
@@ -14,13 +14,6 @@ class IrLogging(models.Model):
|
|||||||
_inherit = 'ir.logging'
|
_inherit = 'ir.logging'
|
||||||
|
|
||||||
def init(self):
|
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()
|
db_id = uuid.uuid1()
|
||||||
_logger.error(db_id)
|
_logger.error(db_id)
|
||||||
self.env.cr.execute("""
|
self.env.cr.execute("""
|
||||||
@@ -57,7 +50,13 @@ class IrLogging(models.Model):
|
|||||||
UPDATE ir_config_parameter set value = '!!! IP WRONG !!!' WHERE key = 'ribbon.name';
|
UPDATE ir_config_parameter set value = '!!! IP WRONG !!!' WHERE key = 'ribbon.name';
|
||||||
""")
|
""")
|
||||||
ADDONS_PATH = odoo.tools.config['addons_path']
|
ADDONS_PATH = odoo.tools.config['addons_path']
|
||||||
_logger.error(ADDONS_PATH)
|
#_logger.error(ADDONS_PATH)
|
||||||
for ap in ADDONS_PATH.split(','):
|
#for ap in ADDONS_PATH.split(','):
|
||||||
if ap[-10:] == 'testserver':
|
# if ap[-10:] == 'testserver':
|
||||||
_logger.error(os.system('./%s/testserver.sh' %(ap)))
|
# _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)
|
||||||
Reference in New Issue
Block a user