我于2014年11月11日下载了新来源。在创建新模块时,我得到了相同的错误。 如果自定义现有模块我没有收到任何错误。
错误:
字段arch
对约束失败:视图定义无效
错误详情:
未找到模型:objective.objective
错误上下文:
查看objective.objective.form
[view_id:1413,xml_id:n / a,model:objective.objective,parent_id:n / a]"在解析文件时:/// D:/Development/Python%20Workspace/8.0-11-14/openerp/addons/project/project_view.xml:943,附近
我的源代码:
<record id="project_objective_form_view" model="ir.ui.view">
<field name="name">project.objective.form</field>
<field name="model">project.objective</field>
<field name="arch" type="xml">
<form string="Project Objective">
<group>
<group>
<field name="name"/>
<field name="category"/>
</group>
</group>
</form>
</field>
</record>
<record id="project_objective_tree_view" model="ir.ui.view">
<field name="name">project.objective.tree</field>
<field name="model">project.objective</field>
<field name="arch" type="xml">
<tree string="Project Objective">
<field name="name"/>
<field name="category"/>
</tree>
</field>
</record>
<record id="project_objective_list" model="ir.actions.act_window">
<field name="name">Project Objective</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">project.objective</field>
<field name="view_type">form</field>
<field name="view_id" ref="project_objective_tree_view"/>
</record>
class project_objective(osv.osv):
_name = "project.objective"
_description = "Project Objective"
_columns = {
'name': fields.char('Name', required=True, translate=True),
'category': fields.char('Category',required=True,),
}
答案 0 :(得分:0)
在Odoo上创建第一个数据库时遇到了同样的问题。安装passlib
软件包后,它的工作正常。我希望这也能解决你的问题。
sudo apt-get install python-passlib