[FIX] moved imports out of the function

pull/7/merge
Jacques-Etienne Baudoux 2014-01-14 10:37:20 +01:00
parent 66ce2210f8
commit c53e71aa5e
1 changed files with 3 additions and 2 deletions

View File

@ -72,13 +72,14 @@ _logger = logging.getLogger('financial.reports.webkit')
# redefine mako_template as this is overriden by jinja since saas-1
# from openerp.addons.report_webkit.webkit_report import mako_template
from mako.template import Template
from mako.lookup import TemplateLookup
def mako_template(text):
"""Build a Mako template.
This template uses UTF-8 encoding
"""
from mako.template import Template
from mako.lookup import TemplateLookup
tmp_lookup = TemplateLookup() #we need it in order to allow inclusion and inheritance
return Template(text, input_encoding='utf-8', output_encoding='utf-8', lookup=tmp_lookup)