'where lang=%s ' \
'and type=%s ' \
'and name=%s ' \
- 'and res_id in ('+','.join(map(str,ids))+')',
+ 'and res_id in ('+','.join(map(str, ids))+')',
(lang,tt,name))
cr.commit()
for id in ids:
_description = "Module Category"
def _module_nbr(self,cr,uid, ids, prop, unknow_none,context):
- cr.execute('select category_id,count(*) from ir_module_module where category_id in ('+','.join(map(str,ids))+') or category_id in (select id from ir_module_category where parent_id in ('+','.join(map(str,ids))+')) group by category_id')
+ cr.execute('select category_id,count(*) from ir_module_module where category_id in ('+','.join(map(str, ids))+') or category_id in (select id from ir_module_category where parent_id in ('+','.join(map(str, ids))+')) group by category_id')
result = dict(cr.fetchall())
for id in ids:
cr.execute('select id from ir_module_category where parent_id=%s', (id,))
}
def unlink(self, cr, uid, ids, context={}):
if ids:
- cr.execute('delete from ir_model_fields where id in (select fields_id from ir_property where (fields_id is not null) and (id in ('+','.join(map(str,ids))+')))')
+ cr.execute('delete from ir_model_fields where id in (select fields_id from ir_property where (fields_id is not null) and (id in ('+','.join(map(str, ids))+')))')
res = super(ir_property, self).unlink(cr, uid, ids, context)
return res
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
- cr.execute('select distinct parent_id from res_partner_category where id in ('+','.join(map(str,ids))+')')
+ cr.execute('select distinct parent_id from res_partner_category where id in ('+','.join(map(str, ids))+')')
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
return True
def address_get(self, cr, uid, ids, adr_pref=['default']):
- cr.execute('select type,id from res_partner_address where partner_id in ('+','.join(map(str,ids))+')')
+ cr.execute('select type,id from res_partner_address where partner_id in ('+','.join(map(str,map(int, ids)))+')')
res = cr.fetchall()
adr = dict(res)
# get the id of the (first) default address if there is one,
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
- cr.execute('select distinct parent_id from res_company where id in ('+','.join(map(str,ids))+')')
+ cr.execute('select distinct parent_id from res_company where id in ('+','.join(map(str, ids))+')')
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False