[REF] removed nested import openerp.

bzr revid: vmt@openerp.com-20130327154714-fa3k6gqtsmlt3vx6
This commit is contained in:
Vo Minh Thu 2013-03-27 16:47:14 +01:00
parent ce58e16138
commit de5c84c0e1
3 changed files with 5 additions and 6 deletions

View File

@ -20,11 +20,13 @@
##############################################################################
import logging
import operator
import os
import re
from socket import gethostname
import time
import openerp
from openerp import SUPERUSER_ID
from openerp import netsvc, tools
from openerp.osv import fields, osv
@ -89,9 +91,6 @@ class report_xml(osv.osv):
"""
Look up a report definition.
"""
import openerp
import operator
import os
opj = os.path.join
# First lookup in the deprecated place, because if the report definition

View File

@ -19,6 +19,8 @@
#
##############################################################################
import openerp
import interface
import print_xml
import print_fnc
@ -30,12 +32,10 @@ import report_sxw
import printscreen
def render_report(cr, uid, ids, name, data, context=None):
"""
Helper to call ``ir.actions.report.xml.render_report()``.
"""
import openerp
registry = openerp.modules.registry.RegistryManager.get(cr.dbname)
return registry['ir.actions.report.xml'].render_report(cr, uid, ids, name, data, context)

View File

@ -25,6 +25,7 @@ import re
from lxml import etree
import openerp.pooler as pooler
import openerp
import openerp.tools as tools
import openerp.modules
import print_xml
@ -45,7 +46,6 @@ class report_int(object):
def __init__(self, name, register=True):
if register:
import openerp
assert openerp.conf.deprecation.allow_report_int_registration
assert name.startswith('report.'), 'Report names should start with "report.".'
assert name not in self._reports, 'The report "%s" already exists.' % name