简体   繁体   中英

ProgrammingError: 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 class:

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 have to restart the Odoo services and PostgreSQL to fix the problem. I think the problem is in the dependencies. I'm stuck... Any ideas?

我解决了这个问题,我只将该模块名称(ville)添加到依赖部分的 openerp.py 文件中..

you're using a base module but you didn't add it to the manifest .py 'depends' values

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM