我正在尝试将项目问题模块从 Odoo 8 移植到 Odoo 10 以向项目添加版本字段。
项目版本.py:
class project_version(models.Model):
_inherit = 'project.project'
_name = "project.version"
_order = "name desc"
_columns = {
'name': fields.char('Version Number', required=True),
'active': fields.boolean('Active', required=False),
}
_defaults = {
'active': 1,
}
当我尝试安装它时,Odoo 说
Model not found: project.project.version
Error context:
View `project_version list`
[view_id: 750, xml_id: n/a, model: project.project.version, parent_id: n/a]
None" while parsing file:///c:/Program%20Files%20(x86)/Odoo%2010.0/server/custom/project_task_version/views/views.xml:9, near
<record model="ir.ui.view" id="project_version.list">
<field name="name">project_version list</field>
<field name="model">project.version</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="active"/>
</tree>
</field>
</record>