Odoo Help

2
2 Answers
1
Palkesh Baraiya
1/2/18, 5:01 AM

Hello Abhijith soman,

You have to Add Window Action for Adding Menu in 'Action'.

Example For Adding Menu in Action.

<act_window id="action_all_customers"
name="All customers"
res_model="res.partner"
view_mode="tree,form"
domain="[('customer', '=', True)]"
context="{'default_customer': True}"
limit="80" />

Example of Menu Structure.

<menuitem id="menu_custom_toplevel" name="My custom menu" />
<menuitem id="menu_custom_left" parent="menu_custom_toplevel" name="This will appear in the left bar" />


1 Comment
Abhijith soman
1/2/18, 5:38 AM

Thanks

1
Avatar

Niyas Raphy

--Niyas Raphy--
14510
| 6 6 9
Calicut, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123

Happy to help :)

Niyas Raphy
1/2/18, 5:05 AM

Hi,

You can create a new one in the action button like this

<act_window id="id_for_record"
name="Test"
src_model="model_name"
res_model=
"model_name_of_wizard"
view_type="form" view_mode="form"
key2="client_action_multi" target="new"
groups="mention_group_to_restrict_the_access"/>

Then you have to define the form view for the model mentioned in res_model.

To See how it is done in the portal access management case, Go to this path and check :-  odoo-10.0/addons/portal/wizard/portal_wizard_views.xml

<!-- wizard action on res.partner -->
<act_window id="id_for_record"
name="Test"
src_model="model_name"
res_model="model_b"
view_type="form" view_mode="form"
key2="client_action_multi" target="new"
groups="mention_group_to_restrict_the_access"/>

<!-- wizard view -->
<record id="wizard_view" model="ir.ui.view">
<field name="name">Test</field>
<field name="model">model_b</field>
<field name="arch" type="xml">
<form string="Test">
# Define the View
<footer>
<button string="Apply" name="action_apply" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-default" special="cancel" />
</footer>
</form>
</field>
</record>

Thanks

1 Comment
Abhijith soman
1/2/18, 5:38 AM

Thanks

Ask a Question
Tag
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now