How to add default views for a model?

  • language
      English
  • type
      technical
  • info created for version
      14.0
  • mvc
      XML (records/views/templates)
Add to Cart

Just create an action and menu item for the model ...


<record id="product_template_attribute_action" model="ir.actions.act_window">
    <field name="name">Product Template Attributes</field>
    <field name="res_model">product.template.attribute.line</field>
    <field name="view_mode">tree,form</field>
 </record>
<menuitem id="menu_product_template_attribute_action"
    action="gun_product.product_template_attribute_action"
    parent="sale.prod_config_main"
    groups="product.group_product_variant"
    sequence="2"/>