Search code examples
pythonodooodoo-12

Custom Module not Displaying in App List in Odoo 12


So I've been stuck on this all day and I'm desperate at this point.

I've been learning about Odoo since yesterday. I created a custom Python module. Here's the code in the field.py

class Field(models.Model):
   _name = "challenge.field"

   name = fields.Char("Full Name", required=True)
   email_address = fields.Char("Email Address")

Here's what is in the views.xml

<odoo>
   <menuitem name="Challenge" id="challenge_root_menu"/>

   <record model="ir.actions.act_window" id="action_challenge_field">
     <field name="name">Field</field>
     <field name="res_model">challenge.field</field>
     <field name="view_mode">tree,form</field>
   </record>
</odoo>

Here's the security.xml

<odoo>
    <record id="testers" model="res.groups">
        <field name="name">Testers Challenge</field>
    </record>

</odoo>

And finally here's the ir.model.access.csv

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
my_challenge,challenge.field,model_challenge_field,testers,1,1,1,1

No matter what I do, the app does not appear in the app field, and thus I can't launch it.

Picture

Thanks.


Solution

  • Assign action to menuitem record.

    <menuitem name="Challenge" id="challenge_root_menu" action="action_challenge_field" />