-
Notifications
You must be signed in to change notification settings - Fork 59
/
view.xml
255 lines (238 loc) · 10.4 KB
/
view.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?xml version="1.0"?>
<odoo>
<record id="view_form_demo_expense_tutorial" model="ir.ui.view">
<field name="name">Demo Expense Tutorial Form</field>
<field name="model">demo.expense.tutorial</field>
<field name="arch" type="xml">
<form string="Demo Expense Tutorial">
<header>
<button name="button_rainbow_man" string="Test Rainbow" type="object" class="oe_highlight o_expense_sheet_submit"/>
<button name="button_act_url" string="Test Act Url" type="object" class="oe_highlight o_expense_sheet_submit"/>
<button name="btn_message_post" string="Message Post" type="object" class="oe_highlight o_expense_sheet_submit"/>
<button name="btn_test_acid_atomicity" string="Test acid atomicity" type="object" class="oe_highlight o_expense_sheet_submit"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="button_sheet_id"
string="SHEET ID" type="object"
attrs="{'invisible':[('sheet_id','=', False)]}" icon="fa-bars"/>
</div>
<group>
<field name="name"/>
<!-- <field name="employee_id" domain="[('user_id', '=', user_id)]"/> -->
<field name="employee_id"/>
<!-- <field name="employee_id" options="{'no_quick_create': True}"/> -->
<!-- <field name="employee_id" options="{'no_create_edit': True}"/> -->
<!-- <field name="employee_id" options="{'no_create': True}"/> -->
<!-- <field name="employee_id" options="{'no_open': True}"/> -->
<field name="user_id"/>
<!-- <field name="tag_ids"/> -->
<field name="tag_ids" widget="many2many_tags"/> <!-- widget -->
<!-- <field name="tag_ids" widget="many2many_tags" groups="demo_expense_tutorial_v1.demo_expense_tutorial_group_manager"/> -->
<field name="sheet_id" context="{'form_view_ref':'demo_expense_tutorial_v1.view_form_demo_expense_sheet_tutorial'}"/>
<!-- <field name="sheet_id" context="{'form_view_ref':'demo_expense_tutorial_v1.custom_view_form_demo_sheet'}"/> -->
<field name="gender"/>
<field name="debug_field" groups="base.group_no_one"/>
<field name="admin_field" groups="base.user_admin"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_tree_demo_expense_tutorial" model="ir.ui.view">
<field name="name">Demo Expense Tutorial List</field>
<field name="model">demo.expense.tutorial</field>
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<tree decoration-info="'info' in name" decoration-muted="'muted' in name" decoration-danger="'danger' in name" decoration-bf="'bf' in name" decoration-warning="'warning' in name" decoration-success="'success' in name">
<!-- <tree default_order="sequence, id desc"> -->
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="employee_id"/>
<field name="user_id"/>
<field name="tag_ids"/>
<field name="sheet_id" widget="many2onebutton"/>
</tree>
</field>
</record>
<!-- change name, employee_id fields-->
<record id="view_tree_demo_expense_tutorial_move" model="ir.ui.view">
<field name="name">view_tree_demo_expense_tutorial_move</field>
<field name="model">demo.expense.tutorial</field>
<field name="inherit_id" ref="demo_expense_tutorial_v1.view_tree_demo_expense_tutorial"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="before">
<field name="employee_id" position="move"/>
</xpath>
</field>
</record>
<record id="view_form_demo_expense_sheet_tutorial" model="ir.ui.view">
<field name="name">Demo Expense Sheet Tutorial Form</field>
<field name="model">demo.expense.sheet.tutorial</field>
<field name="arch" type="xml">
<form string="Demo Expense Sheet Tutorial">
<header>
<button name="add_demo_expense_record" string="add demo expense record" type="object"/>
<button name="link_demo_expense_record" string="link demo expense record" type="object"/>
<button name="replace_demo_expense_record" string="replace expense record" type="object"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button"
name="button_line_ids"
type="object"
attrs="{'invisible':[('expense_line_ids','=', False)]}"
icon="fa-bars">
<field name="demo_expenses_count" widget="statinfo" string="Counts"/>
</button>
</div>
<group>
<field name="name"/>
</group>
<notebook>
<page string="Expense">
<field name="expense_line_ids" >
<!-- <tree> -->
<tree editable="top"> <!-- <<<<<<<<<<<< -->
<!-- <tree editable="bottom"> --> <!-- <<<<<<<<<<<< -->
<field name="name"/>
<field name="employee_id"/>
<field name="tag_ids" widget="many2many_tags" attrs="{'readonly': [('parent.name', '=', 'test-readonly')]}"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="custom_view_form_demo_sheet" model="ir.ui.view">
<field name="name">Custim Demo Sheet Form</field>
<field name="model">demo.expense.sheet.tutorial</field>
<field name="arch" type="xml">
<form string="custom_view_form_demo_sheet">
<sheet>
<group>
<field name="name"/>
</group>
<notebook>
<page string="Expense">
<field name="expense_line_ids" >
<tree editable="top">
<field name="name"/>
<field name="employee_id"/>
<field name="tag_ids" widget="many2many_tags" attrs="{'readonly': [('parent.name', '=', 'test-readonly')]}"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_tree_demo_expense_sheet_tutorial" model="ir.ui.view">
<field name="name">Demo Expense Sheet Tutorial List</field>
<field name="model">demo.expense.sheet.tutorial</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="expense_line_ids"/>
</tree>
</field>
</record>
<record id="view_filter_demo_expense_tutorial" model="ir.ui.view">
<field name="name">Demo Expense Tutorial Filter</field>
<field name="model">demo.expense.tutorial</field>
<field name="arch" type="xml">
<search string="Demo Expense Tutorial Filter">
<field name="name" string="Name"/>
<field name="employee_id" filter_domain="['|', ('employee_id', 'ilike', self), ('user_id', 'ilike', self)]" string="User"/>
<filter name="filter_inactive" domain="[('active','=',False)]" string="Inactive"/>
<filter name="gender" domain="[('gender','=','male')]" string="Male"/>
<separator/>
<filter name="name" domain="[('name', 'ilike', 'a')]" string="Name_2"/>
<group expand="0" string="Group By">
<filter string="Sheet" name="sheet" domain="[]" context="{'group_by': 'sheet_id'}"/>
<filter string="Employee" name="employee" domain="[]" context="{'group_by': 'employee_id'}"/>
</group>
</search>
</field>
</record>
<record id="view_tree_demo_expense_tutorial_no_create" model="ir.ui.view">
<field name="name">Demo Expense Tutorial List No Create</field>
<field name="model">demo.expense.tutorial</field>
<field name="arch" type="xml">
<tree string="no_create_tree" create="0" delete="false" edit="1" editable="top">
<field name="name"/>
<field name="employee_id"/>
</tree>
</field>
</record>
<record id="tree_expense_view_id_1" model="ir.ui.view">
<field name="name">Demo Expense Tutorial List View id 1</field>
<field name="model">demo.expense.tutorial</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="employee_id"/>
<field name="user_id"/>
<field name="sheet_id"/>
</tree>
</field>
</record>
<record id="form_expense_view_id_1" model="ir.ui.view">
<field name="name">Demo Expense Tutorial Form view id 1</field>
<field name="model">demo.expense.tutorial</field>
<field name="arch" type="xml">
<form string="Demo Expense Tutorial">
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="button_sheet_id"
string="SHEET ID" type="object"
attrs="{'invisible':[('sheet_id','=', False)]}" icon="fa-bars"/>
</div>
<group>
<field name="name"/>
<field name="employee_id"/>
<field name="user_id"/>
<field name="sheet_id"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="tree_expense_view_id_2" model="ir.ui.view">
<field name="name">Demo Expense Tutorial List View id 2</field>
<field name="model">demo.expense.tutorial</field>
<!-- <field name="priority" eval="1"/> -->
<field name="arch" type="xml">
<tree>
<field name="sheet_id"/>
<field name="user_id"/>
<field name="employee_id"/>
<field name="name"/>
</tree>
</field>
</record>
<record id="form_expense_view_id_2" model="ir.ui.view">
<field name="name">Demo Expense Tutorial Form view id 2</field>
<field name="model">demo.expense.tutorial</field>
<field name="arch" type="xml">
<form string="Demo Expense Tutorial">
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="button_sheet_id"
string="SHEET ID" type="object"
attrs="{'invisible':[('sheet_id','=', False)]}" icon="fa-bars"/>
</div>
<group>
<field name="sheet_id"/>
<field name="user_id"/>
<field name="employee_id"/>
<field name="name"/>
</group>
</sheet>
</form>
</field>
</record>
</odoo>