ProgrammingError:关系“_unknown”不存在LINE 1

时间:2018-03-05 14:42:50

标签: python odoo

我在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才能解决问题。我认为问题出在依赖关系中。我被困了......有什么想法吗?

1 个答案:

答案 0 :(得分:2)

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