1
<?xml version="1.0" encoding="utf-8"?>
5
<!-- HQ Entries tree view -->
6
<record id="hq_entries_tree" model="ir.ui.view">
7
<field name="name">HQ Entries List</field>
8
<field name="model">hq.entries</field>
9
<field name="type">tree</field>
10
<field name="arch" type="xml">
11
<tree string="HQ Entries List" editable="top" noteditable="user_validated==True or is_original==True" hide_new_button="1" colors="black: analytic_state=='valid' and is_split==True;blue:analytic_state in ('valid') and is_original==False and is_split==False;gray:is_original==True;red:analytic_state in ('invalid')" limit="50">
12
<field name="name" attrs="{'readonly': [('is_split', '=', False)]}"/>
14
<field name="document_date"/>
16
<field name="period_id"/>
17
<field name="account_id" domain="[('type', '!=', 'view'), ('restricted_area', '=', 'hq_lines'), ('is_not_hq_correctible', '=', False)]"/>
18
<field name="partner_txt"/>
19
<field name="amount"/>
20
<field name="currency_id"/>
21
<field name="destination_id" on_change="onchange_destination(destination_id, analytic_id, account_id)" context="{'search_default_active': 1, 'hide_inactive': 1, 'date': date}"/>
22
<field name="cost_center_id" context="{'search_default_active': 1, 'hide_inactive': 1, 'date': date}"/>
23
<field name="analytic_id" context="{'search_default_active': 1, 'hide_inactive': 1, 'date': document_date}"/>
24
<field name="free_1_id" context="{'search_default_active': 1, 'hide_inactive': 1, 'date': date}"/>
25
<field name="free_2_id" context="{'search_default_active': 1, 'hide_inactive': 1, 'date': date}"/>
26
<field name="user_validated" invisible="1"/>
27
<field name="analytic_state" invisible="1"/>
28
<field name="is_original" invisible="1"/>
29
<field name="is_split" invisible="1"/>
30
<field name="original_id"/>
35
<!-- HQ Entries search view -->
36
<record id="hq_entries_filter" model="ir.ui.view">
37
<field name="name">HQ Entries</field>
38
<field name="model">hq.entries</field>
39
<field name="type">search</field>
40
<field name="arch" type="xml">
41
<search string="Search HQ Entries">
42
<group col='10' colspan='4'>
43
<filter icon="gtk-new" string="To validate" domain="[('user_validated', '=', False)]" help="Non validated entries" name="non_validated"/>
44
<filter icon="gtk-apply" string="Validated" domain="[('user_validated', '=', True)]" help="Validated entries" name="validated"/>
45
<separator orientation="vertical"/>
46
<filter icon="gtk-about" string="Original" domain="[('is_original', '=', True)]" help="Original HQ entries" name="original"/>
47
<filter icon="terp-administration" string="Split" domain="[('is_split', '=', True)]" help="Split entries" name="split"/>
48
<separator orientation="vertical"/>
49
<field name="date" select='1'/>
50
<field name="account_id" select='1'/>
51
<field name="partner_txt" select='1'/>
53
<field name="destination_id" select='1' domain="[('type', '!=', 'view'), ('category', '=', 'DEST')]"/>
54
<field name="cost_center_id" select='1' domain="[('type', '!=', 'view'), ('category', '=', 'OC')]"/>
55
<field name="analytic_id" select='1' domain="[('type', '!=', 'view'), ('category', '=', 'FUNDING')]"/>
58
<group expand="0" string="Group By..." colspan="12" col="10">
59
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_txt'}"/>
60
<separator orientation="vertical"/>
61
<filter string="Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
62
<separator orientation="vertical"/>
63
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
64
<separator orientation="vertical"/>
65
<filter string="Original" icon="gtk-about" domain="[]" context="{'group_by': 'original_id'}"/>
72
<!-- HQ Entries form view -->
73
<record id="hq_entries_form" model="ir.ui.view">
74
<field name="name">HQ Entry</field>
75
<field name="model">hq.entries</field>
76
<field name="type">form</field>
77
<field name="arch" type="xml">
78
<form string="HQ Entry" hide_duplicate_button="1" hide_new_button="1">
79
<separator string="General Information"/>
80
<group colspan="4" col="4">
81
<field name="name" readonly="1"/>
82
<field name="ref" readonly="1"/>
83
<field name="account_id" readonly="1"/>
84
<field name="period_id" readonly="1"/>
85
<field name="document_date" readonly="1"/>
86
<field name="date" readonly="1"/>
87
<field name="partner_txt" readonly="1"/>
89
<field name="amount" readonly="1"/>
90
<field name="currency_id" readonly="1"/>
92
<group colspan="2" col="2">
93
<separator string="Analytic Allocation (At import)"/>
94
<field name="destination_id_first_value" readonly="1"/>
95
<field name="cost_center_id_first_value" readonly="1"/>
96
<field name="analytic_id_first_value" readonly="1"/>
98
<group colspan="2" col="2">
99
<separator string="Analytic Allocation (Current)"/>
100
<field name="destination_id" readonly="1"/>
101
<field name="cost_center_id" readonly="1"/>
102
<field name="analytic_id" readonly="1"/>
103
<field name="free_1_id" readonly="1"/>
104
<field name="free_2_id" readonly="1"/>
106
<separator string="Extra Information"/>
107
<group colspan="4" col="4">
108
<field name="is_original" string="Original Entry" readonly="1"/>
109
<field name="is_split" string="Split Entry" readonly="1"/>
118
<record id="hq_entries_import_wizard" model="ir.ui.view">
119
<field name="name">hq.entries.import.wizard</field>
120
<field name="model">hq.entries.import</field>
121
<field name="type">form</field>
122
<field name="arch" type="xml">
123
<form string="Import HQ Entries">
124
<label string="This will import HQ entries from a csv file." colspan="4"/>
126
<field name="file" filename="filename"/>
127
<field name="filename" invisible="1"/>
128
<group colspan="4" col="2">
129
<button string="Cancel" special="cancel" icon="gtk-cancel"/>
130
<button name="button_validate" type="object" string="Import" icon="terp-camera_test"/>
136
<record id="analytic_hq_reallocation_wizard" model="ir.ui.view">
137
<field name="name">analytic.hq.reallocation.wizard</field>
138
<field name="model">hq.analytic.reallocation</field>
139
<field name="type">form</field>
140
<field name="arch" type="xml">
141
<form string="Analytic Reallocation">
142
<group colspan="6" col="6">
143
<field name="destination_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
144
<field name="cost_center_id" on_change="onchange_cost_center(cost_center_id, analytic_id)" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
145
<field name="analytic_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
148
<field name="free_1_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
149
<field name="free_2_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
150
<group colspan="6" col="4">
151
<button string="Cancel" special="cancel" icon="gtk-cancel"/>
152
<button name="button_validate" type="object" string="Validate" icon="terp-camera_test"/>
158
<record id="hq_reallocation_wizard" model="ir.ui.view">
159
<field name="name">hq.reallocation.wizard</field>
160
<field name="model">hq.reallocation</field>
161
<field name="type">form</field>
162
<field name="arch" type="xml">
163
<form string="Reallocation">
164
<field name="account_id" colspan="2"/>
165
<label string="" colspan="2"/>
166
<group colspan="6" col="4">
167
<button string="Cancel" special="cancel" icon="gtk-cancel"/>
168
<button name="button_validate" type="object" string="Validate" icon="terp-camera_test"/>
175
New account attribute for HQ entries corrections
178
<record id="inherit_view_account_form2" model="ir.ui.view">
179
<field name='name'>inherit.view.account.form2</field>
180
<field name='model'>account.account</field>
181
<field name="type">form</field>
182
<field name='inherit_id' ref='account.view_account_form'/>
183
<field name="priority" eval="20"/>
184
<field name="arch" type="xml">
185
<xpath expr="//field[@name='user_type']" position="after">
186
<field name="is_not_hq_correctible"/>
191
<record id="inherit_view_account_tree2" model="ir.ui.view">
192
<field name='name'>inherit.view.account.tree2</field>
193
<field name='model'>account.account</field>
194
<field name="type">tree</field>
195
<field name='inherit_id' ref='account.view_account_tree'/>
196
<field name="priority" eval="20"/>
197
<field name="arch" type="xml">
198
<xpath expr="//field[@name='activation_date']" position="before">
199
<field name="is_not_hq_correctible" invisible="1"/>
205
<!-- Actions: Menu actions -->
206
<record id="action_hq_entries_import_wizard" model="ir.actions.act_window">
207
<field name="name">Import HQ Entries</field>
208
<field name="res_model">hq.entries.import</field>
209
<field name="view_type">form</field>
210
<field name="view_mode">form</field>
211
<field name="view_id" ref="hq_entries_import_wizard"/>
212
<field name="target">new</field>
215
<record model="ir.actions.act_window" id="action_hq_entries_tree">
216
<field name="name">HQ Entries</field>
217
<field name="res_model">hq.entries</field>
218
<field name="view_type">form</field>
219
<field name="view_mode">tree,form</field>
220
<field name="view_id" ref="hq_entries_tree"/>
221
<field name="search_view_id" ref="hq_entries_filter"/>
222
<field name="context">{'search_default_non_validated': 1}</field>
225
<!-- Action: lines validation -->
226
<record id="action_hq_validation" model="ir.actions.server">
227
<field name="name">Validation</field>
228
<field name="model_id" ref="model_hq_entries"/>
229
<field name="state">code</field>
230
<field name="code">action = obj.get_validation_wizard(context=context)</field>
233
<record id="ir_open_hq_validation" model="ir.values">
234
<field name="key2">client_action_multi</field>
235
<field name="model">hq.entries</field>
236
<field name="name">Validation</field>
237
<field eval="'ir.actions.server,%d'%action_hq_validation" name="value"/>
238
<field eval="True" name="object"/>
241
<!-- Display HQ Entry Split wizard -->
242
<record id="action_hq_split" model="ir.actions.server">
243
<field name="name">Split</field>
244
<field name="model_id" ref="model_hq_entries"/>
245
<field name="state">code</field>
246
<field name="code">action = obj.get_split_wizard(context=context)</field>
249
<record id="ir_open_hq_split" model="ir.values">
250
<field name="key2">client_action_multi</field>
251
<field name="model">hq.entries</field>
252
<field name="name">Split</field>
253
<field eval="'ir.actions.server,%d'%action_hq_split" name="value"/>
254
<field eval="True" name="object"/>
257
<!-- Display HQ Entry Unsplit wizard -->
258
<record id="action_hq_unsplit" model="ir.actions.server">
259
<field name="name">Unsplit</field>
260
<field name="model_id" ref="model_hq_entries"/>
261
<field name="state">code</field>
262
<field name="code">action = obj.get_unsplit_wizard(context=context)</field>
265
<record id="ir_open_hq_unsplit" model="ir.values">
266
<field name="key2">client_action_multi</field>
267
<field name="model">hq.entries</field>
268
<field name="name">Unsplit</field>
269
<field eval="'ir.actions.server,%d'%action_hq_unsplit" name="value"/>
270
<field eval="True" name="object"/>
273
<!-- Mass analytic reallocation wizard for HQ Entries -->
274
<act_window id="action_hq_analytic_reallocation"
275
name="Analytic reallocation"
276
res_model="hq.analytic.reallocation"
277
src_model="hq.entries"
278
key2="client_action_multi"
282
view_id="analytic_hq_reallocation_wizard"/>
284
<!-- Mass reallocation wizard for HQ Entries -->
285
<act_window id="action_hq_reallocation"
286
name="Change Account"
287
res_model="hq.reallocation"
288
src_model="hq.entries"
289
key2="client_action_multi"
293
view_id="hq_reallocation_wizard"/>
296
<menuitem id="menu_hq" name="HQ" parent="account.menu_finance" sequence="6"/>
297
<menuitem name="HQ Import" action="action_hq_entries_import_wizard" id="menu_hq_entries_import" parent="menu_hq" sequence="1"/>
298
<menuitem name="HQ Entries" action="action_hq_entries_tree" id="menu_hq_entries" parent="menu_hq" sequence="2"/>