res = self._obj.execute(query, params) ProgrammingError: relation "idea_ideas" does not exist

Asked by Navaneeth Krishnan

I created one module named idea and i installed it in openERPv6.0.But for some reason i removed my postgresql and installed postgresql v9.1 in my system.And when i try to run that idea module its showing some error like this

                                                     *************************************************

[2012-04-11 15:22:39,664][idea] INFO:init:module idea_new_navaneeth: creating or updating database tables
[2012-04-11 15:22:39,710][idea] ERROR:db.cursor:Programming error: relation "idea_ideas" does not exist
, in query ALTER TABLE "idea_vote" ADD FOREIGN KEY ("idea_id") REFERENCES "idea_ideas" ON DELETE set null
[2012-04-11 15:22:39,711][idea] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/addons/__init__.py", line 719, in load_module_graph
    init_module_objects(cr, package.name, modules)
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/addons/__init__.py", line 414, in init_module_objects
    result = obj._auto_init(cr, {'module': module_name})
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/osv/orm.py", line 2693, in _auto_init
    cr.execute('ALTER TABLE "%s" ADD FOREIGN KEY ("%s") REFERENCES "%s" ON DELETE %s' % (self._table, k, ref, f.ondelete))
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/sql_db.py", line 78, in wrapper
    return f(self, *args, **kwargs)
  File "/home1/navaneethk/openERP/aswc/scp/6.0_Stable/server/bin/sql_db.py", line 131, in execute
    res = self._obj.execute(query, params)
ProgrammingError: relation "idea_ideas" does not exist

                                      **************************************************************

To fix this issue I created a new database and tried ,I changed the '_name' in my code and tried.But i was not able to fix this issue..

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Navaneeth Krishnan
Solved:
Last query:
Last reply:
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#1

I suppose, you have changed the code by mistake for the relation to be idea.ideas instead of idea.idea.

Search through your code,Double check and remove any false reference.

Cntrl + S might have forced this.

Regards.

Revision history for this message
Navaneeth Krishnan (navaneethk) said :
#2

Thanks Serpent Consulting Services (serpent-consulting-services)
Double checking the code helped.

Revision history for this message
Navaneeth Krishnan (navaneethk) said :
#3

Thanks Serpent Consulting Services (serpent-consulting-services)
Double checking the code helped.