|
|
@ -56,8 +56,8 @@ class CleanupPurgeLineTable(orm.TransientModel): |
|
|
|
FROM pg_attribute af, pg_attribute a, |
|
|
|
(SELECT conname, conrelid, confrelid,conkey[i] AS conkey, |
|
|
|
confkey[i] AS confkey |
|
|
|
FROM (select conname, conrelid, confrelid, conkey, confkey, |
|
|
|
generate_series(1,array_upper(conkey,1)) AS i |
|
|
|
FROM (select conname, conrelid, confrelid, conkey, |
|
|
|
confkey, generate_series(1,array_upper(conkey,1)) AS i |
|
|
|
FROM pg_constraint WHERE contype = 'f') ss) ss2 |
|
|
|
WHERE af.attnum = confkey AND af.attrelid = confrelid AND |
|
|
|
a.attnum = conkey AND a.attrelid = conrelid |
|
|
@ -80,6 +80,7 @@ class CleanupPurgeLineTable(orm.TransientModel): |
|
|
|
cr.commit() |
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
class CleanupPurgeWizardTable(orm.TransientModel): |
|
|
|
_inherit = 'cleanup.purge.wizard' |
|
|
|
_name = 'cleanup.purge.wizard.table' |
|
|
@ -97,7 +98,6 @@ class CleanupPurgeWizardTable(orm.TransientModel): |
|
|
|
Ignore views for now. |
|
|
|
""" |
|
|
|
model_ids = self.pool['ir.model'].search(cr, uid, [], context=context) |
|
|
|
line_pool = self.pool['cleanup.purge.line.table'] |
|
|
|
# Start out with known tables with no model |
|
|
|
known_tables = ['wkf_witm_trans'] |
|
|
|
for model in self.pool['ir.model'].browse( |
|
|
|