[LINT] removed unused variable, forgot to change two variables in last commit, corrected typo introduced at 3417.6.6.
bzr revid: vmt@openerp.com-20110615072231-jh977xk1jupekkpp
This commit is contained in:
parent
e375049414
commit
26f22874d9
|
@ -138,7 +138,7 @@ class RegistryManager(object):
|
|||
cr.close()
|
||||
|
||||
if pooljobs:
|
||||
pool.get('ir.cron').restart(registry.db.dbname)
|
||||
registry.get('ir.cron').restart(registry.db.dbname)
|
||||
|
||||
return registry
|
||||
|
||||
|
|
|
@ -830,9 +830,6 @@ class orm_template(object):
|
|||
if x=='.id': return [x]
|
||||
return x.replace(':id','/id').replace('.id','/.id').split('/')
|
||||
fields_to_export = map(fsplit, fields_to_export)
|
||||
fields_export = fields_to_export + []
|
||||
warning = ''
|
||||
warning_fields = []
|
||||
datas = []
|
||||
for row in self.browse(cr, uid, ids, context):
|
||||
datas += self.__export_row(cr, uid, row, fields_to_export, context)
|
||||
|
@ -1020,7 +1017,6 @@ class orm_template(object):
|
|||
|
||||
if config.get('import_partial', False) and filename:
|
||||
data = pickle.load(file(config.get('import_partial')))
|
||||
original_value = data.get(filename, 0)
|
||||
|
||||
position = 0
|
||||
while position<len(datas):
|
||||
|
@ -1033,7 +1029,7 @@ class orm_template(object):
|
|||
return (-1, res, 'Line ' + str(position) +' : ' + '!\n'.join(warning), '')
|
||||
|
||||
try:
|
||||
id = ir_model_data_obj._update(cr, uid, self._name,
|
||||
ir_model_data_obj._update(cr, uid, self._name,
|
||||
current_module, res, mode=mode, xml_id=xml_id,
|
||||
noupdate=noupdate, res_id=res_id, context=context)
|
||||
except Exception, e:
|
||||
|
@ -1705,7 +1701,6 @@ class orm_template(object):
|
|||
result = {'type': view_type, 'model': self._name}
|
||||
|
||||
ok = True
|
||||
model = True
|
||||
sql_res = False
|
||||
parent_view_model = None
|
||||
while ok:
|
||||
|
@ -1739,7 +1734,6 @@ class orm_template(object):
|
|||
|
||||
ok = sql_res[5]
|
||||
view_id = ok or sql_res[3]
|
||||
model = False
|
||||
parent_view_model = sql_res[6]
|
||||
|
||||
# if a view was found
|
||||
|
|
|
@ -23,13 +23,10 @@
|
|||
# OSV: Objects Services
|
||||
#
|
||||
|
||||
import sys
|
||||
import inspect
|
||||
import orm
|
||||
import openerp.netsvc as netsvc
|
||||
import openerp.pooler as pooler
|
||||
import openerp.sql_db as sql_db
|
||||
import copy
|
||||
import logging
|
||||
from psycopg2 import IntegrityError, errorcodes
|
||||
from openerp.tools.func import wraps
|
||||
|
@ -92,7 +89,7 @@ class object_proxy(netsvc.Service):
|
|||
ids = args[3]
|
||||
else:
|
||||
ids = []
|
||||
cr = sql_db.db_connect(db_name).cursor()
|
||||
cr = sql_db.db_connect(dbname).cursor()
|
||||
return src(obj, cr, uid, ids, context=(ctx or {}))
|
||||
except Exception:
|
||||
pass
|
||||
|
@ -103,7 +100,7 @@ class object_proxy(netsvc.Service):
|
|||
# be returned, it is the best we have.
|
||||
|
||||
try:
|
||||
cr = sql_db.db_connect(db_name).cursor()
|
||||
cr = sql_db.db_connect(dbname).cursor()
|
||||
res = translate(cr, name=False, source_type=ttype,
|
||||
lang=lang, source=src)
|
||||
if res:
|
||||
|
|
|
@ -36,7 +36,7 @@ def get_db_and_pool(db_name, force_demo=False, status=None, update_module=False,
|
|||
|
||||
def delete_pool(db_name):
|
||||
"""Delete an existing registry."""
|
||||
_Registries.delete(db_name)
|
||||
RegistryManager.delete(db_name)
|
||||
|
||||
|
||||
def restart_pool(db_name, force_demo=False, status=None, update_module=False):
|
||||
|
|
Loading…
Reference in New Issue