[IMP] ir.model: lint cleanup
bzr revid: odo@openerp.com-20120321151523-vy01phnlz1zinldo
This commit is contained in:
parent
258722cc1c
commit
0102e40253
|
@ -1,5 +1,5 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
|
@ -74,7 +74,7 @@ class ir_model(osv.osv):
|
|||
def _search_osv_memory(self, cr, uid, model, name, domain, context=None):
|
||||
if not domain:
|
||||
return []
|
||||
field, operator, value = domain[0]
|
||||
_, operator, value = domain[0]
|
||||
if operator not in ['=', '!=']:
|
||||
raise osv.except_osv(_('Invalid search criterions'), _('The osv_memory field can only be compared with = and != operator.'))
|
||||
value = bool(value) if operator == '=' else not bool(value)
|
||||
|
@ -434,7 +434,7 @@ class ir_model_fields(osv.osv):
|
|||
ctx = context.copy()
|
||||
ctx.update({'select': vals.get('select_level','0'),'update_custom_fields':True})
|
||||
|
||||
for model_key, patch_struct in models_patch.items():
|
||||
for _, patch_struct in models_patch.items():
|
||||
obj = patch_struct[0]
|
||||
for col_name, col_prop, val in patch_struct[1]:
|
||||
setattr(obj._columns[col_name], col_prop, val)
|
||||
|
@ -911,7 +911,6 @@ class ir_model_data(osv.osv):
|
|||
if not modules:
|
||||
return True
|
||||
modules = list(modules)
|
||||
data_ids = self.search(cr, uid, [('module','in',modules)])
|
||||
module_in = ",".join(["%s"] * len(modules))
|
||||
process_query = 'select id,name,model,res_id,module from ir_model_data where module IN (' + module_in + ')'
|
||||
process_query+= ' and noupdate=%s'
|
||||
|
@ -926,6 +925,5 @@ class ir_model_data(osv.osv):
|
|||
_logger.info('Deleting %s@%s', res_id, model)
|
||||
self.pool.get(model).unlink(cr, uid, [res_id])
|
||||
|
||||
ir_model_data()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue