Hello!
I want to call views with some added entries in the 'More'/'Action' Menu.
I created following code to do this in a Modul 'fc_menu', but the 'More'/'Action' Menu is not displayed.
Does somebody know what is wrong in my code or give me a solution for this?
Here is the code...
File "fc_models.py" :
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class InputCockpitTest(models.TransientModel):
_name = 'fc.input.cockpit'
_description = 'A model for testing the input cockpit'
input_cockpit_name = fields.Char('Input-Cockpit-Name' , Required=False)
File "fc_menu_view.xml" => Menu entry leading to main view :
<menuitem id="fc_input_cockpit_menu" name="Input cockpit"
parent="fc_cockpits_menu"
action="fc_action_input_cockpit"
sequence="1"/>
Action, View and More Menu of main view :
<!-- input cockpit dashboard Action-->
<record id="fc_action_input_cockpit" model="ir.actions.act_window">
<field name="name">Input Cockpit Action</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">fc.input.cockpit</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="fc_view_input_cockpit"/>
<field name="help" type="html">
<div class="oe_empty_custom_dashboard">
<p>
<b>Your input cockpit dashboard is empty.</b>
</p>
</div>
</field>
</record>
<!-- input cockpit dashboard View-->
<record model="ir.ui.view" id="fc_view_input_cockpit">
<field name="name">Dashboard input cockpit</field>
<field name="model">fc.input.cockpit</field>
<field name="arch" type="xml">
<form string="Input Cockpit Dashboard">
<board style="2-1">
<column>
<field name="input_cockpit_name"/>
</column>
</board>
</form>
</field>
</record>
<!-- input cockpit More Action Menu - Test entry 1 -->
<record id="fc_ir_values_input_cockpit" model="ir.values">
<field name="model_id" ref="fc_menu.model_fc_input_cockpit" />
<field name="name">Input Cockpit test</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('fc_action_input_cockpit_test'))" />
<field name="key">action</field>
<field name="model">fc.input.cockpit</field>
</record>
<!-- input cockpit More Action Menu - Test entry 2 -->
<record id="fc_ir_values_input_cockpit_2" model="ir.values">
<field name="model_id" ref="fc_menu.model_fc_input_cockpit" />
<field name="name">Input Cockpit test 2</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('fc_action_input_cockpit_test_2'))" />
<field name="key">action</field>
<field name="model">fc.input.cockpit</field>
</record>
Goal View / Action of entry 1 in 'More'/'Action' Menu :
<!-- input cockpit test Action-->
<record id="fc_action_input_cockpit_test" model="ir.actions.act_window">
<field name="name">Input Cockpit Test Action</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">fc.input.cockpit</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="fc_view_input_cockpit_test"/>
<field name="target">current</field>
<field name="multi">True</field>
<field name="help" type="html">
<div class="oe_empty_custom_dashboard">
<p>
<b>Your input cockpit test view is empty.</b>
</p>
</div>
</field>
</record>
<!-- input cockpit test View-->
<record id="fc_view_input_cockpit_test" model="ir.ui.view">
<field name="name">Input Cockpit Test View</field>
<field name="model">fc.input.cockpit</field>
<field name="arch" type="xml">
<form string="Input Cockpit" version="7.0">
<!-- Design Form or put your field here -->
<footer>
<!-- Add button on footer of pop-up window -->
</footer>
</form>
</field>
</record>
I hope anyone can help me please finding a solution to call views from 'More'/'Action' Menu!
Many Thanks in advance!
Did you checked action menu in settings front end.
This might not be added to more menu by default.
Hello, thanks for your answer!
Sorry but I did not know what you mean?
Could please explan where exactly to change some settings?