Hi
I follow the odoo tutorial Building a module and I have an issue with the Many2one field.
I got this error
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition
Error details:
Field `responsible_id` does not exist
when I cheked the model I found out that the field don't exist.
the file openacademy.xml :
<record model="ir.ui.view" id="course_form_view">
<field name="name">course.form</field>
<field name="model">openacademy.course</field>
<field name="arch" type="xml">
<form string="Course Form">
<sheet>
<group>
<field name="name"/>
<field name="responsible_id"/>
</group>
<notebook>
<page string="Description">
<field name="description"/>
</page>
<page string="About">
This is an example of notebooks
</page>
</notebook>
</sheet>
<search>
<field name="name"/>
<field name="description"/>
</search>
</form>
</field>
</record>
the file models.py :
class Course(models.Model) :
_name = 'openacademy.course'
name = fields.Char(string="Title",required=True)
description = fields.Text()
responsible_id = fields.Many2one('res.users',
ondelete='set null', string="Responsible", index=True)
Thank you for the help.