Search in sources :

Example 11 with TemplateMaker

use of com.axelor.tool.template.TemplateMaker in project axelor-open-suite by axelor.

the class TemplateService method processContent.

public String processContent(String timeZone, Template template, Model bean, String beanName, Map<String, Object> context) {
    TemplateMaker maker = new TemplateMaker(timeZone, AppFilter.getLocale(), '$', '$');
    maker.setTemplate(template.getContent());
    maker.setContext(bean, context, beanName);
    return maker.make();
}
Also used : TemplateMaker(com.axelor.tool.template.TemplateMaker)

Aggregations

TemplateMaker (com.axelor.tool.template.TemplateMaker)11 Model (com.axelor.db.Model)4 AxelorException (com.axelor.exception.AxelorException)4 MetaModel (com.axelor.meta.db.MetaModel)4 Company (com.axelor.apps.base.db.Company)3 Transactional (com.google.inject.persist.Transactional)3 AppFilter (com.axelor.app.internal.AppFilter)2 Language (com.axelor.apps.base.db.Language)2 Context (com.axelor.rpc.Context)2 Binding (groovy.lang.Binding)2 GroovyShell (groovy.lang.GroovyShell)2 BigDecimal (java.math.BigDecimal)2 Locale (java.util.Locale)2 CompilerConfiguration (org.codehaus.groovy.control.CompilerConfiguration)2 ImportCustomizer (org.codehaus.groovy.control.customizers.ImportCustomizer)2 Test (org.junit.Test)2 Print (com.axelor.apps.base.db.Print)1 PrintTemplate (com.axelor.apps.base.db.PrintTemplate)1 PrintTemplateLineTest (com.axelor.apps.base.db.PrintTemplateLineTest)1 UnitConversion (com.axelor.apps.base.db.UnitConversion)1