Search code examples
pythonodooodoo-13

Odoo 13.0 Can't see my installed module on the menu


I am a newbie on Odoo 13.0 (and any Odoo version). I just built my first module, and successfully installed it. The problem is that I can't see my installed module on the menu. I have tried restarting the server and also I have researched these sources but anything seems to work for me:

Sources:

  1. Odoo Official Docs
  2. Custom module doesn't show up in the list of apps
  3. My module is installed but i cannot see it in the menu

Here are my files, so hopefully, someone could point me out in the right direction.

__manifest__.py

# -*- coding: utf-8 -*-
{
    'name': "sample_app",

    'summary': """
        Short (1 phrase/line) summary of the module's purpose, used as
        subtitle on modules listing or apps.openerp.com""",

    'description': """
        Long description of module's purpose
    """,

    'author': "My Company",
    'website': "http://www.yourcompany.com",

    # Categories can be used to filter modules in modules listing
    # Check https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/data/ir_module_category_data.xml
    # for the full list
    'category': 'Uncategorized',
    'version': '0.1',

    # any module necessary for this one to work correctly
    'depends': ['base'],

    # always loaded
    'data': [
        # 'security/ir.model.access.csv',
        'views/views.xml',
        'views/templates.xml',
    ],
    # only loaded in demonstration mode
    'demo': [
        'demo/demo.xml',
    ],
    'installable':True,
    'auto_install':False,
    'application':True
}

__init__.py

# -*- coding: utf-8 -*-

from . import controllers
from . import models

models/models.py

# -*- coding: utf-8 -*-

from odoo import models, fields, api

class StudentRecord(models.Model):
    _name = "student.student"
    name = fields.Char(string="Name", required=True)
    middle_name = fields.Char(string="Middle Name", required=True)
    last_name = fields.Char(srtring="Last Name", required=True)
    photo = fields.Binary(string="Photo")
    student_age = fields.Integer(string="Age")
    student_dob = fields.Date(string="Date of Birth")
    student_gender = fields.Selection([("m","Male"),("f","Female"),("o","Other")], string="Gender")
    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")

views/views.xml

<?xml version="1.0" encoding="UTF-8"?>
<odoo>

  <record id="view_student_form" model="ir.ui.view">
    <field name="name">student.student.form</field>
    <field name="model">student.student</field>
    <field name="priority" eval="8" />
    <field name="arch" type="xml">
        <form string="Student">
            <sheet>
                <field name="photo" widget="image" class="oe_left oe_avatar" />
                <div class="oe_title">
                    <h1>
                        <table>
                            <tr>
                                <td style="padding-right:10px;"><field name="name" required="1" placeholder="First Name" /></td>
                                <td style="padding-right:10px;"><field name="middle_name" placeholder="Middle Name" /></td>
                                <td style="padding-right:10px;"><field name="last_name" placeholder="Last Name" /></td>
                            </tr>
                        </table>
                    </h1>
                </div>
                <notebook colspan="4">
                    <page name="personal_information"
                        string="Personal Information">
                        <group col="4" colspan="4"
                            name="personal_detail">
                            <field name="student_gender" />
                            <field name="student_age" />
                            <field name="student_dob" />
                            <field name="student_gender" />
                            <field name="student_blood_group" />
                        </group>
                    </page>
                </notebook>
            </sheet>
        </form>
    </field>
  </record>

  <record model="ir.actions.act_window" id="action_view_students">
    <field name="name">Students</field>
    <field name="res_model">student.student</field>
    <field name="view_mode">tree,form</field>
    <field name="domain">[]</field>
  </record>

  <menuitem id="menu_school" name="School"/>
  <menuitem id="school_student" name="Students" parent="menu_school" action="action_view_students"/>

</odoo>

Edit: Here is the image of the menu, I was expecting to see my sample_test application in there after installation.

Not in the menu

Also, Odoo shows my installed app here:

Installed app

I appreciate your time and help in the matter. Thanks!!


Solution

  • I just found how to do it. These are the steps I followed to solve my problem:

    1. As shown in the image, I don't have the School module on my menu.

    enter image description here

    1. So, I went to Settings and Activated the Developer Mode (First one)

    enter image description here

    1. Then after the page was reloaded, my main bar (not sure about the actual name of it) turned into this:

    enter image description here

    1. I noticed that a bug appeared in my main bar

    enter image description here

    1. Then for the sake of curiosity, I clicked on the bug and selected the option Become superuser

    enter image description here enter image description here

    1. I noticed that my main bar changed like this:

    enter image description here

    1. Finally, after opening the Menu my module was there!! (hooray!)

    enter image description here

    And, that is the end for the story (for now) I still need to figure out how to deploy this changes into production, but that my friends is another story!

    Thanks!