Update on_* field of trigger in tests

Since bc7e074fc4d9 the fields of trigger has been suffixed with an '_'.
This commit is contained in:
Cédric Krier
2025-04-07 00:30:35 +02:00
parent 39af772212
commit 5041a85ef6
2 changed files with 9 additions and 9 deletions
@@ -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',
+4 -4
View File
@@ -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')