use of com.axelor.apps.base.db.MailTemplateAssociation in project axelor-open-suite by axelor.
the class MailServiceBaseImpl method getTemplateByModel.
protected Template getTemplateByModel(Model entity) {
Class<?> klass = EntityHelper.getEntityClass(entity);
List<MailTemplateAssociation> mailTemplateAssociationList = Beans.get(AppBaseService.class).getAppBase().getMailTemplateAssociationList();
if (mailTemplateAssociationList != null) {
for (MailTemplateAssociation item : mailTemplateAssociationList) {
if (item.getModel().getFullName().equals(klass.getName())) {
return item.getEmailTemplate();
}
}
}
return null;
}
Aggregations