我在Odoo中遇到此错误:

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


hotel类:

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


ville类:

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


我必须重新启动Odoo服务和PostgreSQL才能解决此问题。我认为问题出在依赖项上。我被卡住了...有什么想法吗?

最佳答案

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

09-30 09:35