My View .xml is
<record id="student_menu_action" model="ir.actions.act_window">
<field name="name">Students</field>
<field name="res_model">student.student</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create The First Student
</p>
</field>
</record>
<record id="teacher_menu_action" model="ir.actions.act_window">
<field name="name">Teachers</field>
<field name="res_model">student.teacher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create The First Teacher
</p>
</field>
and Menu item is:-
<menuitem id="school_menu"
name="School"/>
<menuitem id="student_menu"
name="Student Details"
parent="school_menu"/>
<menuitem id="school_student_menu"
parent="student_menu"
name="Student"
action="student_menu_action"/>
<menuitem id="teacher_menu"
name="Teacher Details"
parent="school_menu"/>
<menuitem id="school_teacher_menu"
parent="teacher_menu"
name="Teacher"
action="teacher_menu_action"/>
And my model is :-
class StudentStudent(models.Model):
_name = 'student.student'
name = fields.Char(string='Name', required=True)
age = fields.Integer(string='Age')
photo = fields.Binary(string='Image')
gender = fields.Selection([('male', 'Male'), ('female', 'Female'), ('others', 'Others')], string='Gender')
student_dob = fields.Date(string="Date of Birth")
student_blood_group = fields.Selection(
[('A+', 'A+ve'), ('B+', 'B+ve'), ('O+', 'O+ve'), ('AB+', 'AB+ve'),
('A-', 'A-ve'), ('B-', 'B-ve'), ('O-', 'O-ve'), ('AB-', 'AB-ve')],
string='Blood Group')
nationality = fields.Many2one('res.country', string='Nationality')
class TeacherTeacher(models.Model):
_name = 'student.teacher'
nametr = fields.Char(string='Name', required=True)
agetr = fields.Integer(string='Age')
phototr = fields.Binary(string='Image')
gendertr = fields.Selection([('male', 'Male'), ('female', 'Female'), ('others', 'Others')], string='Gender')
teacher_dob = fields.Date(string="Date of Birth")
teacher_blood_group = fields.Selection(
[('A+', 'A+ve'), ('B+', 'B+ve'), ('O+', 'O+ve'), ('AB+', 'AB+ve'),
('A-', 'A-ve'), ('B-', 'B-ve'), ('O-', 'O-ve'), ('AB-', 'AB-ve')],
string='Blood Group')
nationalitytr = fields.Many2one('res.country', string='Nationality')
when selecting a menu from Teacher under parent menu Teacher Details the Heading contails
Name/student.teacher,1 instead of name of student
Odoo Customization Tips: http://learnopenerp.blogspot.com/