From 5041a85ef61ebf40a80de5cedcb6938a4c1a1e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 7 Apr 2025 00:30:35 +0200 Subject: [PATCH] Update on_* field of trigger in tests Since bc7e074fc4d9 the fields of trigger has been suffixed with an '_'. --- modules/notification_email/tests/test_module.py | 10 +++++----- proteus/proteus/tests/test_model.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/notification_email/tests/test_module.py b/modules/notification_email/tests/test_module.py index a59e4b7d2c..04d0448881 100644 --- a/modules/notification_email/tests/test_module.py +++ b/modules/notification_email/tests/test_module.py @@ -97,7 +97,7 @@ class NotificationEmailTestCase(CompanyTestMixin, ModuleTestCase): trigger, = Trigger.create([{ 'name': 'Test creation', 'model': model.id, - 'on_create': True, + 'on_create_': True, 'condition': 'true', 'notification_email': notification_email.id, 'action': 'notification.email|trigger', @@ -148,7 +148,7 @@ class NotificationEmailTestCase(CompanyTestMixin, ModuleTestCase): trigger, = Trigger.create([{ 'name': 'Test creation', 'model': model.id, - 'on_create': True, + 'on_create_': True, 'condition': 'true', 'notification_email': notification_email.id, 'action': 'notification.email|trigger', @@ -191,7 +191,7 @@ class NotificationEmailTestCase(CompanyTestMixin, ModuleTestCase): Trigger.create([{ 'name': 'Test creation', 'model': model.id, - 'on_create': True, + 'on_create_': True, 'condition': 'true', 'notification_email': notification_email.id, 'action': 'notification.email|trigger', @@ -346,7 +346,7 @@ class NotificationEmailTestCase(CompanyTestMixin, ModuleTestCase): Trigger.create([{ 'name': 'Test creation', 'model': model.id, - 'on_create': True, + 'on_create_': True, 'condition': 'true', 'notification_email': notification_email.id, 'action': 'notification.email|trigger', @@ -383,7 +383,7 @@ class NotificationEmailTestCase(CompanyTestMixin, ModuleTestCase): Trigger.create([{ 'name': 'Test creation', 'model': model.id, - 'on_create': True, + 'on_create_': True, 'condition': 'true', 'notification_email': notification_email.id, 'action': 'notification.email|trigger', diff --git a/proteus/proteus/tests/test_model.py b/proteus/proteus/tests/test_model.py index 14e26b5129..51d18ef671 100644 --- a/proteus/proteus/tests/test_model.py +++ b/proteus/proteus/tests/test_model.py @@ -336,11 +336,11 @@ class TestModel(ProteusTestCase): trigger = Trigger() - trigger.on_time = True - self.assertEqual(trigger.on_create, False) + trigger.on_time_ = True + self.assertEqual(trigger.on_create_, False) - trigger.on_create = True - self.assertEqual(trigger.on_time, False) + trigger.on_create_ = True + self.assertEqual(trigger.on_time_, False) def test_on_change_with(self): Attachment = Model.get('ir.attachment')