Skip to Content
Menu
This question has been flagged
1 Reply
4735 Views

Using Odoo 13 CE, trying to make really basic module and learning how to add things to the menu and keep getting this error and after 2 hours I'm out of ideas to try. I've validated the XML through a checker, tried using code from another module, Visual Studio code autocomplete, code from tutorial videos. 

Here's my XML. If I comment out the first record section it installs without error, so there's something in there. 

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="qualitycontrol_method_action" model="ir.actions.act_window">
      <field name="name">Quality Control Method</field>
      <field name="res_model">qualitycontrol.method</field>
      <field name="type">ir.actions.act_window</field>
      <field name="view_mode">tree,form</field>
      <field name="domain">[]</field>
      <field name="context">{}</field>
      <field name="help" type="html">
        
      </field>
    </record>
    <menuitem
      id="qualitycontrol_menu"
      name="Quality Control"
      parent="mrp.menu_mrp_root"
      sequence="5"/>

    <!--<menuitem
      id="qualitycontrol_method_menu"
      name="Measurement Methods"
      action="qualitycontrol_action"
      parent="qualitycontrol_menu"
      sequence="10"/>-->
</odoo>
Avatar
Discard
Best Answer

Hi,

Try this code:

<record id="quality_control_method_action" model="ir.actions.act_window">
<field name="name">Quality Control Method</field>
<field name="res_model">qualitycontrol.method</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create your first QC Method.
</p>
</field>

</record>

<menuitem id="quality_control_menu"
name="Quality Control"
parent="mrp.menu_mrp_root"
sequence="5"/>

Seems you have added the help for the action and missed to add the <p> </p>


If you are new to odoo development, see this: How To Create Menu And Actions In Odoo


Thanks

Avatar
Discard
Author

Thanks! That was it.