parent
077f4c500a
commit
b0da1f4fb9
|
@ -80,9 +80,14 @@ class CleanupPurgeLineModel(orm.TransientModel):
|
|||
cr, uid, constraint_ids, context=context)
|
||||
relation_ids = fields_pool.search(
|
||||
cr, uid, [('relation', '=', row[1])], context=context)
|
||||
if relation_ids:
|
||||
fields_pool.unlink(cr, uid, relation_ids,
|
||||
context=local_context)
|
||||
for relation in relation_ids:
|
||||
try:
|
||||
# Fails if the model on the target side
|
||||
# cannot be instantiated
|
||||
fields_pool.unlink(cr, uid, [relation],
|
||||
context=local_context)
|
||||
except AttributeError:
|
||||
pass
|
||||
model_pool.unlink(cr, uid, [row[0]], context=local_context)
|
||||
line.write({'purged': True})
|
||||
cr.commit()
|
||||
|
|
|
@ -88,7 +88,7 @@ class CleanupPurgeWizardTable(orm.TransientModel):
|
|||
res = super(CleanupPurgeWizardTable, self).default_get(
|
||||
cr, uid, fields, context=context)
|
||||
if 'name' in fields:
|
||||
res['name'] = _('Purge modules')
|
||||
res['name'] = _('Purge tables')
|
||||
return res
|
||||
|
||||
def find(self, cr, uid, context=None):
|
||||
|
|
Loading…
Reference in New Issue