[REF] openerp.report: remove unused imports and vars, simplify logging.
bzr revid: florent.xicluna@gmail.com-20120208170700-csx9jb3nwmvq3dzj
This commit is contained in:
parent
7675d45c2c
commit
6312fd9426
|
@ -21,7 +21,6 @@
|
|||
|
||||
import os
|
||||
import time
|
||||
import openerp.netsvc as netsvc
|
||||
|
||||
import openerp.tools as tools
|
||||
from openerp.tools.safe_eval import safe_eval as eval
|
||||
|
@ -67,7 +66,6 @@ class report_custom(report_int):
|
|||
#
|
||||
def _row_get(self, cr, uid, objs, fields, conditions, row_canvas=None, group_by=None):
|
||||
result = []
|
||||
tmp = []
|
||||
for obj in objs:
|
||||
tobreak = False
|
||||
for cond in conditions:
|
||||
|
@ -365,7 +363,6 @@ class report_custom(report_int):
|
|||
order_date['Y'] = lambda x : x
|
||||
|
||||
abscissa = []
|
||||
tmp = {}
|
||||
|
||||
idx = 0
|
||||
date_idx = None
|
||||
|
|
|
@ -20,9 +20,7 @@
|
|||
##############################################################################
|
||||
|
||||
from openerp.report.render.rml2pdf import utils
|
||||
from lxml import etree
|
||||
import copy
|
||||
import openerp.pooler as pooler
|
||||
import base64
|
||||
import cStringIO
|
||||
import re
|
||||
|
|
|
@ -23,8 +23,7 @@ import mako
|
|||
from lxml import etree
|
||||
from mako.template import Template
|
||||
from mako.lookup import TemplateLookup
|
||||
import openerp.netsvc as netsvc
|
||||
import traceback, sys, os
|
||||
import os
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -126,9 +125,8 @@ class makohtml2html(object):
|
|||
final_html += self.format_header(etree_obj)
|
||||
final_html += self.format_body(etree_obj)
|
||||
return final_html
|
||||
except Exception,e:
|
||||
tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
_logger.error('report :\n%s\n%s\n', tb_s, str(e))
|
||||
except Exception:
|
||||
_logger.exception('report :')
|
||||
|
||||
def parseNode(html, localcontext = {}):
|
||||
r = makohtml2html(html, localcontext)
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
##############################################################################
|
||||
|
||||
from openerp.report.render.rml2pdf import utils
|
||||
from lxml import etree
|
||||
import copy
|
||||
|
||||
class odt2odt(object):
|
||||
|
|
|
@ -39,7 +39,7 @@ import sys
|
|||
import cStringIO
|
||||
from lxml import etree
|
||||
import copy
|
||||
import utils
|
||||
|
||||
from openerp.report.render.rml2pdf import utils
|
||||
|
||||
class _flowable(object):
|
||||
|
|
|
@ -22,9 +22,7 @@
|
|||
|
||||
import sys
|
||||
import StringIO
|
||||
import copy
|
||||
from lxml import etree
|
||||
import base64
|
||||
|
||||
import utils
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
import re
|
||||
import reportlab
|
||||
import reportlab.lib.units
|
||||
from lxml import etree
|
||||
from openerp.tools.safe_eval import safe_eval as eval
|
||||
|
||||
_regex = re.compile('\[\[(.+?)\]\]')
|
||||
|
|
|
@ -66,7 +66,6 @@ class simple(render.render):
|
|||
return self.result.getvalue()
|
||||
|
||||
if __name__=='__main__':
|
||||
import time
|
||||
s = simple()
|
||||
s.xml = '''<test>
|
||||
<author-list>
|
||||
|
|
Loading…
Reference in New Issue