<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Tree view for 'data_to_move' model -->
<record id="view_data_to_move_tree" model="data_to_move">
<field name="name">data_to_move_tree</field>
<field name="model">data_to_move</field>
<field name="arch" type="xml">
<tree string="Data to Move">
<field name="name"/>
<field name="id"/>
<field name="write_date"/>
</tree>
</field>
</record>
<!-- Form view for 'data_to_move' model -->
<record id="view_data_to_move_form" model="data_to_move">
<field name="name">data_to_move_form</field>
<field name="model">data_to_move</field>
<field name="arch" type="xml">
<form string="Data to Move">
<sheet>
<group>
<field name="name"/>
<field name="id"/>
<field name="write_date"/>
</group>
<div class="oe_button_box" name="button_box">
<button name="action_button_1" string="Button 1" type="object" class="oe_highlight"/>
<button name="action_button_2" string="Button 2" type="object" class="oe_link"/>
</div>
</sheet>
</form>
</field>
</record>
<!-- Action for the model -->
<record id="action_data_to_move" model="data_to_move">
<field name="name">Data to Move</field>
<field name="res_model">data_to_move</field>
<field name="view_mode">tree,form</field>
<field name="domain">['|', ('active', '=', False), ('active', '=', True)]</field>
</record>
<!-- Define the menu item under a parent -->
<menuitem id="menu_data_to_move_root" name="Data Management" sequence="1"/>
<menuitem id="menu_data_to_move" parent="menu_data_to_move_root" name="Data to Move" action="action_data_to_move" sequence="10"/>
</data>
</odoo>
I am developing a simple Odoo application to push some data out of odoo to another database we host locally. When I try to use this code, Odoo will install the application properly, but I cannot access any part of it from the website GUI, and there is no menu item added to the primary drop down menu in Odoo 17. Does anyone have any idea what I am doing wrong?
I am quite new to XML, following several online tutorials and checking existing code in other Odoo addons has led me in circles.
I have tried several refactors of code, changing where in the code the menu item and records are located, adding and removing tags and adding app="True" in the last menu item declaration line.
None of which help, and adding app="True" to the final menu item declaration just causes assertion errors during the compilation, and does not seem necessary in Odoo 17.
If you have any idea what I am doing wrong, or have any documentation that could help, please let me know. Thank you
You're introducing a new business model and have to add model access (ir.model.access) to your module. Without access you wont see anything, except as superuser. You can switch to superuser mode in the debug mode of Odoo. For some hints or further information look into Chapter 4: Security - A Brief Introduction of Odoo's framework tutorial.