diff --git a/testserver_o2b/models/init_test.py b/testserver_o2b/models/init_test.py index d583292..ef3e98b 100644 --- a/testserver_o2b/models/init_test.py +++ b/testserver_o2b/models/init_test.py @@ -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) \ No newline at end of file