summaryrefslogtreecommitdiff
path: root/addons/account/views/account_bank_statement_views.xml
blob: 7b02f726daed7056f5d3c5bca8f9dbacf6083750 (plain)
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>

        <record id="view_account_bnk_stmt_cashbox" model="ir.ui.view">
            <field name="name">account.bnk_stmt_cashbox.form</field>
            <field name="model">account.bank.statement.cashbox</field>
            <field name="arch" type="xml">
                <form>
                    <sheet>
                        <field name="start_bank_stmt_ids" invisible="1"/>
                        <field name="end_bank_stmt_ids" invisible="1"/>
                        <field name="currency_id" invisible="1"/>
                        <field name="cashbox_lines_ids" nolabel="1" context="{'default_currency_id': currency_id}">
                            <tree editable="bottom">
                                <field name="currency_id" invisible="1"/>
                                <field name="number"/>
                                <field name="coin_value" widget="monetary" options="{'currency_field': 'currency_id'}"/>
                                <field name="subtotal" widget="monetary" options="{'currency_field': 'currency_id'}"/>
                            </tree>
                        </field>
                        <div>
                            <group>
                                <group class="oe_subtotal_footer oe_right" cols="6">
                                    <field name="currency_id" invisible="1" />
                                    <div class="o_td_label"></div>
                                    <field name="total" widget="monetary" options="{'currency_field': 'currency_id'}"/>
                                </group>
                            </group>
                        </div>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="view_account_bnk_stmt_cashbox_footer" model="ir.ui.view">
            <field name="name">account.bnk_stmt_cashbox.form</field>
            <field name="model">account.bank.statement.cashbox</field>
            <field name="priority">1000</field>
            <field name="mode">primary</field>
            <field name="inherit_id" ref="view_account_bnk_stmt_cashbox"/>
            <field name="arch" type="xml">
                <xpath expr="//sheet" position="after">
                    <footer>
                        <button string="Confirm" class="btn-primary" special="save"/>
                        <button string="Cancel" class="btn-secondary" special="cancel"/>
                    </footer>
                </xpath>
            </field>
        </record>

        <record id="view_account_bnk_stmt_check" model="ir.ui.view">
            <field name="name">account.bnk_stmt_check.form</field>
            <field name="model">account.bank.statement.closebalance</field>
            <field name="arch" type="xml">
                <form>
                <div>
                    <p>The closing balance is different than the computed one!</p>
                    <p>Confirming this will create automatically a journal entry with the difference in the profit/loss account set on the cash journal.</p>
                    <footer>
                        <button string="Confirm" name="validate" type="object" class="btn-primary"/>
                        <button string="Cancel" class="btn-secondary" special="cancel"/>
                    </footer>
                </div>
                </form>
            </field>
        </record>

        <record id="action_view_account_bnk_stmt_check" model="ir.actions.act_window">
            <field name="name">Check Closing Balance</field>
            <field name="res_model">account.bank.statement.closebalance</field>
            <field name="view_mode">tree,form</field>
            <field name="view_id" ref="view_account_bnk_stmt_check"/>
            <field name="target">new</field>
        </record>

        <record id="view_bank_statement_tree" model="ir.ui.view">
            <field name="name">account.bank.statement.tree</field>
            <field name="model">account.bank.statement</field>
            <field name="arch" type="xml">
                <tree decoration-danger="not is_difference_zero" decoration-info="state=='open' and is_difference_zero" string="Statements">
                    <field name="name"/>
                    <field name="date"/>
                    <field name="journal_id"/>
                    <field name="company_id" groups="base.group_multi_company"/>
                    <field name="balance_start"/>
                    <field name="balance_end_real"/>
                    <field name="balance_end" invisible="1"/>
                    <field name="currency_id" invisible="1"/>
                    <field name="state"/>
                    <field name="is_difference_zero" invisible="1"/>
                </tree>
            </field>
        </record>

        <record id="view_bank_statement_search" model="ir.ui.view">
            <field name="name">account.bank.statement.search</field>
            <field name="model">account.bank.statement</field>
            <field name="arch" type="xml">
                <search string="Search Bank Statements">
                    <field name="name" string="Bank Statement"/>
                    <field name="date"/>
                    <filter string="New" name="draft" domain="[('state','=','open')]"/>
                    <filter string="Processing" name="processing" domain="[('state','=','posted')]"/>
                    <filter string="Validated" name="confirmed" domain="[('state','=','confirm')]"/>
                    <separator/>
                    <filter name="filter_date" date="date"/>
                    <field name="journal_id" domain="[('type', 'in', ('bank', 'cash'))]" />
                    <group expand="0" string="Group By">
                        <filter string="Journal" name="journal" context="{'group_by': 'journal_id'}"/>
                        <filter string="Status" name="status" context="{'group_by': 'state'}"/>
                        <filter string="Date" name="date" context="{'group_by': 'date'}"/>
                    </group>
                </search>
            </field>
        </record>

        <record id="view_bank_statement_form" model="ir.ui.view">
            <field name="name">account.bank.statement.form</field>
            <field name="model">account.bank.statement</field>
            <field name="priority">1</field>
            <field name="arch" type="xml">
                <form string="Bank Statement">
                <header>
                    <button string="Post" states="open" class="oe_highlight"
                            name="button_post" type="object"/>
                    <button string="Validate" class="oe_highlight"
                            name="button_validate_or_action" type="object"
                            attrs="{'invisible':['|', '|', ('all_lines_reconciled', '=', False), ('line_ids','=',[]), ('state', '!=', 'posted')]}"/>
                    <button string="Reset to New"
                            name="button_reopen" type="object"
                            attrs="{'invisible': [('state', '!=', 'posted')]}"/>
                    <button string="Reset to Processing"
                            name="button_reprocess" type="object"
                            attrs="{'invisible': [('state', '!=', 'confirm')]}"/>
                    <button name="%(action_cash_box_out)d" string="Take Money In/Out" type="action" class="oe_highlight" attrs="{'invisible': [('journal_type','!=','cash')]}"/>
                    <field name="state" widget="statusbar" statusbar_visible="open,posted,confirm"/>
                </header>
                <div class="alert alert-warning" role="alert" attrs="{'invisible': ['|', ('previous_statement_id', '=', False), ('is_valid_balance_start', '=', True)]}">
                    The starting balance <b>doesn't match</b> with the ending balance of the previous bank statement.
                </div>
                <sheet>
                    <!-- Invisible fields -->
                    <field name="all_lines_reconciled" invisible="1" />
                    <field name="move_line_count" invisible="1"/>
                    <field name="country_code" invisible="1"/>

                    <div class="oe_button_box" name="button_box">
                        <button class="oe_stat_button" name="button_journal_entries"
                                string="Journal Entries" type="object"
                                attrs="{'invisible':[('move_line_count','=', 0)]}" icon="fa-bars"/>
                    </div>

                    <div class="oe_title oe_inline">
                        <label for="name" class="oe_edit_only"/>
                        <h1><field name="name"/></h1>
                    </div>
                    <group>
                        <group>
                            <field name="previous_statement_id" invisible="1"/>
                            <field name="is_valid_balance_start" invisible="1"/>
                            <field name="journal_type" invisible="1"/>
                            <field name="cashbox_start_id" invisible="1"/>
                            <field name="cashbox_end_id" invisible="1"/>
                            <field name="journal_id" domain="[('type', '=', journal_type)]" attrs="{'readonly': [('move_line_count','!=', 0)]}" widget="selection"/>
                            <field name="date"
                                   attrs="{'readonly': [('state', '!=', 'open')]}"
                                   options="{'datepicker': {'warn_future': true}}"/>
                            <field name='company_id' options="{'no_create': True}" groups="base.group_multi_company" />
                            <field name="currency_id" invisible="1"/>
                        </group><group>
                            <label for="balance_start"/>
                            <div>
                                <field name="balance_start" class="oe_inline" attrs="{'readonly': [('state', '=', 'confirm')]}"/>
                                <button name="open_cashbox_id" attrs="{'invisible': ['|',('state','!=','open'),('journal_type','!=','cash')]}" string="&#8594; Count" type="object" class="oe_edit_only oe_link oe_inline" context="{'balance':'start'}"/>
                            </div>
                            <label for="balance_end_real"/>
                            <div>
                                <field name="balance_end_real" class="oe_inline" attrs="{'readonly': [('state', '=', 'confirm')]}"/>
                                <button name="open_cashbox_id" attrs="{'invisible': ['|',('state','!=','open'),('journal_type','!=','cash')]}" string="&#8594; Count" type="object" class="oe_edit_only oe_link oe_inline" context="{'balance':'close'}"/>
                            </div>
                        </group>
                    </group>

                    <notebook>
                        <page string="Transactions" name="statement_line_ids">
                            <field name="line_ids"
                                   attrs="{'readonly': [('state', '!=', 'open')]}"
                                   context="{'default_date': date, 'default_journal_id': journal_id}">
                                <tree string="Statement lines"
                                      editable="bottom"
                                      decoration-muted="is_reconciled"
                                      limit="500">

                                    <!-- Invisible fields -->
                                    <field name="company_id" invisible="1"/>
                                    <field name="state" invisible="1"/>
                                    <field name="is_reconciled" invisible="1"/>
                                    <field name="currency_id" invisible="1"/>
                                    <field name="partner_bank_id" invisible="1"/>
                                    <field name="country_code" invisible="1"/>

                                    <!-- Visible fields -->
                                    <field name="sequence" widget="handle"/>
                                    <field name="date"
                                           attrs="{'readonly': [('parent.state', '!=', 'open')]}"/>
                                    <field name="payment_ref"/>
                                    <field name="partner_id"
                                           attrs="{'readonly': [('parent.state', '!=', 'open')]}"
                                           domain="['|', ('parent_id','=', False), ('is_company','=',True)]"/>
                                    <field name="ref" optional="hidden"/>
                                    <field name="transaction_type" optional="hidden"/>
                                    <field name="narration" string="Notes" optional="hidden"/>
                                    <field name="amount"
                                           attrs="{'readonly': [('parent.state', '!=', 'open')]}"/>
                                    <field name="amount_currency" optional="hidden" groups="base.group_multi_currency"
                                           attrs="{'readonly': [('parent.state', '!=', 'open')]}"/>
                                    <field name="account_number" optional="hidden"/>
                                    <field name="foreign_currency_id" optional="hidden" groups="base.group_multi_currency"
                                           attrs="{'readonly': [('parent.state', '!=', 'open')]}"/>

                                    <!-- Buttons -->
                                    <button name="button_undo_reconciliation" type="object"
                                            attrs="{'invisible': [('is_reconciled', '=', False)], 'column_invisible': [('parent.state', '!=', 'posted')]}"
                                            string="Revert reconciliation" icon="fa-undo"/>
                                </tree>
                            </field>
                        </page>
                    </notebook>
                    <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
                        <div class="oe_subtotal_footer_separator oe_inline">
                            <label for="balance_end" />
                        </div>
                        <field name="balance_end" nolabel="1" class="oe_subtotal_footer_separator"/>
                    </group>
                    <div class="oe_clear"/>
                </sheet>
                <div class="o_attachment_preview"/>
                <div class="oe_chatter">
                    <field name="message_follower_ids"/>
                    <field name="message_ids"/>
                </div>
                </form>
            </field>
        </record>

        <record id="action_bank_statement_tree" model="ir.actions.act_window">
            <field name="name">Bank Statements</field>
            <field name="res_model">account.bank.statement</field>
            <field name="view_mode">tree,form,pivot,graph</field>
            <field name="domain">[('journal_id.type', '=', 'bank')]</field>
            <field name="context">{'journal_type':'bank'}</field>
            <field name="search_view_id" ref="view_bank_statement_search"/>
            <field name="help" type="html">
              <p class="o_view_nocontent_smiling_face">
                Register a bank statement
              </p><p>
                A bank statement is a summary of all financial transactions
                occurring over a given period of time on a bank account. You
                should receive this periodicaly from your bank.
              </p><p>
                Odoo allows you to reconcile a statement line directly with
                the related sale or purchase invoices.
              </p>
            </field>
        </record>
        <record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank">
            <field name="sequence" eval="1"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_bank_statement_tree"/>
            <field name="act_window_id" ref="action_bank_statement_tree"/>
        </record>
        <record model="ir.actions.act_window.view" id="action_bank_statement_form_bank">
            <field name="sequence" eval="2"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_bank_statement_form"/>
            <field name="act_window_id" ref="action_bank_statement_tree"/>
        </record>

        <record id="view_bank_statement_line_search" model="ir.ui.view">
            <field name="name">account.bank.statement.line.search</field>
            <field name="model">account.bank.statement.line</field>
            <field name="arch" type="xml">
                <search string="Search Bank Statements Line">
                    <field name="payment_ref"/>
                    <field name="statement_id"/>
                    <field name="partner_id"/>
                    <field name="date"/>
                    <field name="journal_id" domain="[('type', 'in', ('bank', 'cash'))]" />
                    <field name="narration" string="Notes"/>
                    <field name="transaction_type"/>
                </search>
            </field>
        </record>

        <record id="view_bank_statement_line_form" model="ir.ui.view">
            <field name="name">bank.statement.line.form</field>
            <field name="model">account.bank.statement.line</field>
            <field name="priority">8</field>
            <field name="arch" type="xml">
                <form string="Statement Line" create="false">
                    <sheet>
                        <group col="4">
                            <!-- Invisible fields -->
                            <field name="state" invisible="1"/>
                            <field name="company_id" invisible="1"/>

                            <!-- Displayed fields -->
                            <field name="statement_id"/>
                            <field name="date"/>
                            <field name="payment_ref"/>
                            <field name="ref"/>
                            <field name="partner_id"/>
                            <field name="amount"/>
                            <field name="sequence"/>
                            <field name="narration" string="Notes"/>
                            <field name="transaction_type"/>
                            <field name="move_id"/>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>
        <record id="view_bank_statement_line_tree" model="ir.ui.view">
            <field name="name">account.bank.statement.line.tree</field>
            <field name="model">account.bank.statement.line</field>
            <field name="priority">8</field>
            <field name="arch" type="xml">
                <tree string="Statement lines" create="false" default_order="date desc, statement_id desc, sequence desc, id desc">
                    <!-- Invisible fields -->
                    <field name="state" invisible="1"/>
                    <field name="sequence" readonly="1" invisible="1"/>
                    <field name="company_id" invisible="1"/>
                    <field name="journal_id" invisible="1" />
                    <field name="is_reconciled" invisible="1"/>
                    <field name="partner_bank_id" invisible="1"/>
                    <field name="currency_id" invisible="1"/>

                    <!-- Displayed fields -->
                    <field name="statement_id" optional="hide"/>
                    <field name="move_id"/>
                    <field name="date"/>
                    <field name="payment_ref"/>
                    <field name="ref" groups="base.group_no_one"/>
                    <field name="partner_id"/>
                    <field name="amount"/>
                    <field name="amount_currency" optional="hidden" groups="base.group_multi_currency"/>
                    <field name="foreign_currency_id" optional="hidden" groups="base.group_multi_currency"/>
                    <field name="account_number" optional="hidden"/>
                    <field name="transaction_type" optional="hidden"/>
                    <field name="narration" optional="hidden"/>

                    <!-- Buttons -->
                    <button name="button_undo_reconciliation" type="object"
                            attrs="{'invisible': [('is_reconciled', '=', False)]}"
                            string="Revert reconciliation" icon="fa-undo"/>
                </tree>
            </field>
        </record>

        <record id="action_bank_statement_line" model="ir.actions.act_window">
            <field name="name">Bank Statement Lines</field>
            <field name="res_model">account.bank.statement.line</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[]</field>
            <field name="context">{}</field>
            <field name="search_view_id" ref="view_bank_statement_line_search"/>
            <field name="help" type="html">
              <p class="o_view_nocontent_empty_folder">
                A bank statement line is a financial transaction on a bank account
              </p><p>
                Odoo allows you to reconcile a statement line directly with
                the related sale or purchase invoice(s).
              </p>
            </field>
        </record>

        <record id="account_bank_statement_pivot" model="ir.ui.view">
            <field name="name">account.bank.statement.pivot</field>
            <field name="model">account.bank.statement</field>
            <field name="arch" type="xml">
                <pivot string="Account Statistics" sample="1">
                    <field name="date" type="row"/>
                    <field name="balance_start" type="measure"/>
                    <field name="balance_end" type="measure"/>
                </pivot>
            </field>
         </record>

        <record id="account_bank_statement_graph" model="ir.ui.view">
            <field name="name">account.bank.statement.graph</field>
            <field name="model">account.bank.statement</field>
            <field name="arch" type="xml">
                <graph string="Account Statistics" type="bar" sample="1">
                    <field name="date"/>
                    <field name="balance_start" operator="+"/>
                    <field name="balance_end" operator="+"/>
                </graph>
            </field>
         </record>

        <record id="action_view_bank_statement_tree" model="ir.actions.act_window">
            <field name="name">Cash Registers</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">account.bank.statement</field>
            <field name="view_mode">tree,form,pivot,graph</field>
            <field name="view_id" ref="view_bank_statement_tree"/>
            <field name="search_view_id" ref="view_bank_statement_search"/>
            <field name="domain">[('journal_id.type', '=', 'cash')]</field>
            <field name="context">{'journal_type':'cash'}</field>
            <field name="help" type="html">
              <p class="o_view_nocontent_smiling_face">
                Create a new cash log
              </p><p>
                A Cash Register allows you to manage cash entries in your cash
                journals. This feature provides an easy way to follow up cash
                payments on a daily basis. You can enter the coins that are in
                your cash box, and then post entries when money comes in or
                goes out of the cash box.
              </p>
            </field>
        </record>

    </data>
</odoo>