Skip to content
Snippets Groups Projects
Commit d81409a2 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] mail: comparing apple and orange adding default_res_id

parent a859bc3a
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,7 @@ class TemplatePreview(models.TransientModel):
return []
template = self.env['mail.template'].browse(int(template_id))
records = self.env[template.model_id.model].search([], limit=10)
if default_res_id and default_res_id not in records:
records |= self.env[template.model_id.model].browse(default_res_id)
records |= records.browse(default_res_id)
return records.name_get()
@api.model
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment