Odoo Help


3 Answers

Ajeet Yadav(Nurosolution Pvt Ltd) India

--Ajeet Yadav(Nurosolution Pvt Ltd)--
| 6 3 7
Noida, India
--Ajeet Yadav(Nurosolution Pvt Ltd)--

Expert in odoo Technical and Functional
I have implemented odoo in various industries successfully with folowing apps- 1-Sales 2-Warehouse 3-Manufacturing 4-Accounting

Ajeet Yadav(Nurosolution Pvt Ltd) India
8/13/19, 2:42 PM

You need to just put correct model name in action 

<field name="res_model">student</field> 
should be 
<field name="res_model">student.student</field>

Niyas Raphy India

--Niyas Raphy--
| 7 7 11
Wayanad, Kerala, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

LinkedIn: https://www.linkedin.com/in/niyasraphy/
Whatsapp : +917736136763
Happy to help :)

Niyas Raphy India
8/12/19, 8:55 AM


You have given the model name wrongly in the XML file, in the Python File you have defined the model with the name student.student and in the Xml you specified the model name as Student. 

What you have to do is that update the model name as below:-

<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

Hope you referred this Blog:  How to Create a Module in Odoo 12

If you are in the starting stage of the odoo development, I will suggest you to have a look at this Videos

1. How To Create Custom Module in Odoo12 - Manifest File

2. Create New Model

3. Define New Menu and Actions in Odoo

4. How To Define Tree and Form View In Odoo



Rajkumar Murugan India

--Rajkumar Murugan--

| 3 1 3
Puducherry, India
--Rajkumar Murugan--

Rajkumar Murugan India
8/12/19, 7:15 AM
Try this:
your code:<field name="res_model">student.student</field>
Change code: <field name="model">student.student</field>
And also call the action in menuitem;
<menuitem id="school_student_menu" parent="school_menu" name="Student" action="student_menu_action"/>

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now