Python – Programming error: relation “_unknown” does not exist LINE 1

Programming error: relation “_unknown” does not exist LINE 1… here is a solution to the problem.

Programming error: relation “_unknown” does not exist LINE 1

I’m getting this error in Odoo :

ProgrammingError: relation "_unknown" does not exist LINE 1: SELECT "_unknown".id FROM "_unknown" ORDER BY "_unknown"." id...

Hotel Rating:

class obj_ghotel(osv.osv):
        _name = "obj.ghotel"
        _description = "Objet ghotel"
        ...
        'id_ville':fields.many2one('obj.ville','ville', 
selection=_get_selection), 

Ville Class:

class obj_ville(osv.osv):
    _name = "obj.ville"
    _description = "Objet ville"
    _rec_name = 'nom_ville'
    ...
        'id_hotel':fields.one2many('obj.ghotel','id_ville'),

I had to restart the Odoo service and PostgreSQL to fix the problem. I think the problem is in the dependencies. I’m stuck… Any ideas?

Solution

I

fixed the issue and I just added the module name (ville) to the openerp.py file in the dependent section.

Related Problems and Solutions