Hi all
By default every view shows list view, i want to change when I click the corespondent menu directly open form menu, how do I do that trough xml file. Any help will appreciate, TQ
Lingga
DotaKAro
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi all
By default every view shows list view, i want to change when I click the corespondent menu directly open form menu, how do I do that trough xml file. Any help will appreciate, TQ
Lingga
DotaKAro
Hi Waspada,
To open the from view directly rather than the tree view on clicking the menu item, you have to change the code in the XML like this,
Take the action of the corresponding menu item in the XML file then,
<field name="view_mode">form,tree</field>
Mention the form view first in the view_mode.
We get the tree view on clicking the menu item is because, tree view will mentioned first then the from view in the view_mode.
I will attach a sample code,
<record model="ir.actions.act_window" id="action_admission_register">
<field name="name">Admission Register</field>
<field name="res_model">course.admission</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="domain"></field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create The Admission
</p>
</field>
</record>
<menuitem id="admission_register_menu" name="Admission Register" parent="test.menu_op_school_root"
action="action_admission_register" sequence="4"/>
Thank You
Thank you Niyas,
It's working :)
Lingga,
Dota Karo
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
0
nov. 24
|
490 | ||
|
8
abr. 23
|
70116 | ||
|
2
jan. 22
|
47034 | ||
|
1
dez. 15
|
3522 | ||
|
1
mar. 15
|
5850 |