-
Notifications
You must be signed in to change notification settings - Fork 59
/
menu.xml
161 lines (136 loc) · 7.42 KB
/
menu.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?xml version="1.0"?>
<odoo>
<!-- demo_expense_tutorial App Menu -->
<menuitem id="demo_expense_tutorial_menu"
name="Demo Expense Tutorial" />
<!-- Action to open the demo_expense_tutorial -->
<act_window id="action_expense_tutorial"
name="Demo Expense Tutorial Action"
res_model="demo.expense.tutorial"
view_mode="tree,form"/>
<!-- Menu item to open the demo_expense_tutorial -->
<menuitem id="menu_expense_tutorial"
name="Demo Expense Tutorial"
action="action_expense_tutorial"
parent="demo_expense_tutorial_menu" />
<!-- Action to open the demo_expense_sheet_tutorial -->
<!-- <act_window id="action_expense_sheet_tutorial"
name="Demo Expense Sheet Tutorial Action"
res_model="demo.expense.sheet.tutorial"
view_mode="tree,form"/> -->
<record id="action_expense_sheet_tutorial" model="ir.actions.act_window">
<field name="name">Demo Expense Sheet Tutorial Action</field>
<field name="res_model">demo.expense.sheet.tutorial</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('demo_expense_tutorial_v1.view_tree_demo_expense_sheet_tutorial')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('demo_expense_tutorial_v1.view_form_demo_expense_sheet_tutorial')})]"/>
</record>
<!-- Menu item to open the demo_expense_sheet_tutorial -->
<menuitem id="menu_expense_sheet_tutorial"
name="Demo Expense Sheet Tutorial"
action="action_expense_sheet_tutorial"
parent="demo_expense_tutorial_menu" />
<!-- Action to open the demo_expense_tutorial_no_craete -->
<record id="action_expense_tutorial_no_craete" model="ir.actions.act_window">
<field name="name">Demo Expense Tutorial Action No Craete</field>
<field name="res_model">demo.expense.tutorial</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_tree_demo_expense_tutorial_no_create"/>
</record>
<!-- Menu item to open the demo_expense_tutorial_no_craete -->
<menuitem id="menu_expense_tutorial_no_craete"
name="Demo Expense Tutorial No Create"
action="action_expense_tutorial_no_craete"
parent="demo_expense_tutorial_menu" />
<!-- Menu item to open the demo_expense_view_ids -->
<menuitem id="menu_expense_tutorial_view_ids"
name="Demo Expense Tutorial View ids"
parent="demo_expense_tutorial_menu" />
<!-- Action to open the menu_expense_tutorial_view_id_1 -->
<record id="action_expense_tutorial_view_id_1" model="ir.actions.act_window">
<field name="name">Demo Expense Tutorial Action View id 1</field>
<field name="res_model">demo.expense.tutorial</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('demo_expense_tutorial_v1.tree_expense_view_id_1')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('demo_expense_tutorial_v1.form_expense_view_id_1')})]"/>
</record>
<!-- Menu item to open the demo_expense_view_id_1 -->
<menuitem id="menu_expense_tutorial_view_id_1"
name="Demo Expense Tutorial View id 1"
sequence="1"
action="action_expense_tutorial_view_id_1"
parent="menu_expense_tutorial_view_ids" />
<!-- Action to open the menu_expense_tutorial_view_id_2 -->
<record id="action_expense_tutorial_view_id_2" model="ir.actions.act_window">
<field name="name">Demo Expense Tutorial Action View id 2</field>
<field name="res_model">demo.expense.tutorial</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('demo_expense_tutorial_v1.tree_expense_view_id_2')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('demo_expense_tutorial_v1.form_expense_view_id_2')})]"/>
</record>
<!-- Menu item to open the demo_expense_view_id_2 -->
<menuitem id="menu_expense_tutorial_view_id_2"
name="Demo Expense Tutorial View id 2"
sequence="2"
action="action_expense_tutorial_view_id_2"
parent="menu_expense_tutorial_view_ids" />
<!-- Menu item to open the menu_expense_tutorial_context-->
<menuitem id="menu_expense_tutorial_root_context"
name="Demo Expense Tutorial View context"
parent="demo_expense_tutorial_menu" />
<!-- Action to open the demo_expense_tutorial_context -->
<record id="action_expense_tutorial_context" model="ir.actions.act_window">
<field name="name">Demo Expense Tutorial Action Context</field>
<field name="res_model">demo.expense.tutorial</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<!-- init search default -->
<field name="context">{'search_default_name': 'test123'}</field>
<!-- init create default name 'test123'-->
<!-- <field name="context">{'default_name': 'test123'}</field> -->
</record>
<!-- Action to open the demo_expense_tutorial_domain -->
<record id="action_expense_tutorial_domain" model="ir.actions.act_window">
<field name="name">Demo Expense Tutorial Action Domain</field>
<field name="res_model">demo.expense.tutorial</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('name', 'like', 'test')]</field>
<field name="context">{}</field>
</record>
<!-- Action to open the demo_expense_tutorial_test_active -->
<record id="action_expense_tutorial_test_active" model="ir.actions.act_window">
<field name="name">Demo Expense Tutorial Action Test Active</field>
<field name="res_model">demo.expense.tutorial</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<!-- init show all (active True False) record -->
<field name="context">{'active_test':False}</field>
<!-- init show only (active True) record -->
<!-- <field name="context">{}</field> -->
</record>
<!-- Menu item to open the demo_expense_tutorial_context -->
<menuitem id="menu_expense_tutorial_context"
name="Demo Expense Tutorial context"
action="action_expense_tutorial_context"
parent="menu_expense_tutorial_root_context" />
<!-- Menu item to open the demo_expense_tutorial_domain -->
<menuitem id="menu_expense_tutorial_domain"
name="Demo Expense Tutorial domain"
action="action_expense_tutorial_domain"
parent="menu_expense_tutorial_root_context" />
<!-- Menu item to open the demo_expense_tutorial_domain -->
<menuitem id="menu_expense_tutorial_active_test"
name="Demo Expense Tutorial active_test"
action="action_expense_tutorial_test_active"
parent="menu_expense_tutorial_root_context" />
</odoo>