Search notification email model by name

Since a4f34799 the field containing the name of the model is 'name'.

Closes #14006
This commit is contained in:
Cédric Krier
2025-05-12 00:10:13 +02:00
parent 9487cbe10d
commit d56984a386
+1 -1
View File
@@ -42,7 +42,7 @@ class Trigger(metaclass=PoolMeta):
if self.notification_email:
try:
trigger_model, = Model.search([
('model', '=', self.notification_email.model),
('name', '=', self.notification_email.model),
])
except ValueError:
pass