From 3059fb99d5aae7cbf2702870c8a63e0a9c1b16ab Mon Sep 17 00:00:00 2001 From: Manuel Reul Date: Mon, 30 Oct 2023 19:48:06 +0000 Subject: [PATCH] Update file init_test.py --- testserver_o2b/models/init_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testserver_o2b/models/init_test.py b/testserver_o2b/models/init_test.py index 4fcc217..4a1c5bb 100644 --- a/testserver_o2b/models/init_test.py +++ b/testserver_o2b/models/init_test.py @@ -24,7 +24,10 @@ class IrLogging(models.Model): UPDATE ir_config_parameter set value = (NOW() + INTERVAL '30 DAY') where key = 'database.expiration_date'; UPDATE ir_config_parameter set value = '%s' where key = 'database.uuid'; INSERT INTO ir_mail_server(smtp_host,smtp_port,name,smtp_authentication,smtp_encryption,active) VALUES ('localhost','1025','mailcatcher','login','name','t'); - DELETE FROM account_online_link WHERE EXISTS ( SELECT * FROM account_online_link WHERE id > 0 ); + IF EXISTS(SELECT * FROM account_online_link WHERE id > 0) + BEGIN + DELETE FROM account_online_link WHERE id > 0 + END; UPDATE delivery_carrier SET prod_environment = False WHERE id>0; """ %(db_id)) model = self.env['ir.model'].search([('model','=','delivery.carrier')])