-
-
Notifications
You must be signed in to change notification settings - Fork 808
/
Copy pathbve_view.xml
176 lines (176 loc) · 7.98 KB
/
bve_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
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="action_bi_view_editor_view_form" model="ir.actions.act_window">
<field name="name">Custom BI Views</field>
<field name="res_model">bve.view</field>
<field name="view_mode">list,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a Custom Query Object.
</p>
<p />
</field>
</record>
<!--
these menu items are parented to the legacy base.menu_board_root menu
to avoid a dependency on the spreadsheet module through
spreadsheet_dashboard. in case spreadsheet_dashboard is installed, the
auto-installable bi_view_editor_spreadsheet_dashboard module moves
them to the spreadsheet_dashboard menu.
-->
<menuitem
id="menu_bi_view_editor_view"
parent="spreadsheet_dashboard.spreadsheet_dashboard_menu_configuration"
action="action_bi_view_editor_view_form"
sequence="50"
/>
<!-- Menu that will contain all the BI views generated by this module -->
<menuitem
id="menu_bi_view_editor_custom_reports"
name="Custom BI Views"
parent="spreadsheet_dashboard.spreadsheet_dashboard_menu_root"
sequence="120"
/>
<record id="view_bi_view_editor_view_tree" model="ir.ui.view">
<field name="model">bve.view</field>
<field name="arch" type="xml">
<list>
<field name="name" />
</list>
</field>
</record>
<record id="view_bi_view_editor_view_form" model="ir.ui.view">
<field name="model">bve.view</field>
<field name="arch" type="xml">
<form>
<header>
<button
name="action_reset"
type="object"
invisible="state != 'created'"
string="Reset to Draft"
groups="bi_view_editor.group_bve_manager"
/>
<button
name="action_create"
type="object"
invisible="state != 'draft'"
string="Generate BI View"
class="oe_highlight"
groups="bi_view_editor.group_bve_manager"
/>
<button
name="open_view"
type="object"
invisible="state != 'created'"
string="Open BI View"
class="oe_highlight"
groups="bi_view_editor.group_bve_manager"
/>
<button
name="%(base.act_menu_create)d"
type="action"
invisible="state != 'created'"
groups="bi_view_editor.group_bve_manager"
icon="fa-align-justify"
string="Create a Menu"
target="new"
context="{'default_menu_id': %(bi_view_editor.menu_bi_view_editor_custom_reports)d}"
/>
<field
name="state"
widget="statusbar"
statusbar_visible="draft,created"
statusbar_colors='{"draft":"blue","created":"blue"}'
/>
</header>
<sheet>
<h1>
<field name="name" readonly="state == 'created'" colspan="4" />
</h1>
<notebook>
<page string="Query Builder">
<field
name="data"
widget="BVEEditor"
nolabel="1"
readonly="state == 'created'"
/>
</page>
<page string="ER Diagram" invisible="not er_diagram_image">
<field nolabel="1" name="er_diagram_image" widget="image" />
</page>
<page string="Details">
<separator string="Fields" />
<field
name="field_ids"
nolabel="1"
readonly="state == 'created'"
>
<list
editable="bottom"
decoration-muted="in_list == False"
create="false"
>
<field name="sequence" widget="handle" />
<field name="description" string="Field" />
<field name="model_id" readonly="1" />
<field name="table_alias" />
<field name="ttype" invisible="1" />
<field
name="row"
invisible="ttype in ('float', 'integer', 'monetary')"
/>
<field
name="column"
invisible="ttype in ('float', 'integer', 'monetary')"
/>
<field
name="measure"
invisible="ttype in ('float', 'integer', 'monetary')"
/>
<field name="in_list" widget="boolean_toggle" />
<field
name="list_attr"
invisible="not in_list or ttype not in ('float', 'integer')"
/>
</list>
</field>
<separator string="Relations" />
<field
name="relation_ids"
nolabel="1"
readonly="state == 'created'"
>
<list editable="bottom" create="false">
<field name="sequence" widget="handle" />
<field name="description" string="Field" />
<field name="model_id" readonly="1" />
<field name="table_alias" />
<field name="join_model_id" readonly="1" />
<field name="join_node" />
<field name="left_join" />
</list>
</field>
</page>
<page string="SQL" groups="base.group_no_one">
<field name="query" />
<group>
<field
name="over_condition"
readonly="state == 'draft'"
/>
</group>
</page>
<page string="Security">
<field nolabel="1" name="group_ids" />
</page>
<page string="Notes">
<field name="note" nolabel="1" colspan="4" />
</page>
</notebook>
</sheet>
</form>
</field>
</record>
</odoo>