/
account_invoice_view.xml
682 lines (650 loc) · 43.1 KB
/
account_invoice_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
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
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Invoices -->
<record id="view_invoice_line_calendar" model="ir.ui.view">
<field name="name">account.invoice.calendar</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<calendar string="Invoices" color="journal_id" date_start="date_invoice">
<field name="partner_id"/>
<field name="amount_total_signed"/>
</calendar>
</field>
</record>
<record model="ir.ui.view" id="view_invoice_pivot">
<field name="name">account.invoice.pivot</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<pivot string="Invoices" display_quantity="true">
<field name="partner_id"/>
<field name="amount_total_signed" type="measure"/>
</pivot>
</field>
</record>
<record model="ir.ui.view" id="view_invoice_graph">
<field name="name">account.invoice.graph</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<graph string="Invoices">
<field name="partner_id"/>
<field name="amount_total_signed" type="measure"/>
</graph>
</field>
</record>
<record id="view_invoice_line_tree" model="ir.ui.view">
<field name="name">account.invoice.line.tree</field>
<field name="model">account.invoice.line</field>
<field name="arch" type="xml">
<tree string="Invoice Line">
<field name="name"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="quantity"/>
<field name="uom_id" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="discount" groups="base.group_no_one"/>
<field name="price_subtotal"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</record>
<record id="view_invoice_line_form" model="ir.ui.view">
<field name="name">account.invoice.line.form</field>
<field name="model">account.invoice.line</field>
<field name="arch" type="xml">
<form string="Invoice Line">
<group>
<group>
<field name="product_id"
context="parent and {'partner_id': parent.partner_id}"/>
<label for="quantity"/>
<div>
<field name="quantity" class="oe_inline"/>
<field name="uom_id" class="oe_inline" groups="product.group_uom"/>
</div>
<field name="price_unit"/>
<field name="discount" groups="base.group_no_one"/>
<field name="currency_id" invisible="1"/>
</group>
<group>
<field domain="[('company_id', '=', parent.company_id)]" name="account_id" groups="account.group_account_user"/>
<field name="invoice_line_tax_ids" context="{'type':parent.get('type')}" domain="[('type_tax_use','!=','none'),('company_id', '=', parent.company_id)]" widget="many2many_tags" options="{'no_create': True}"/>
<field domain="[('company_id', '=', parent.company_id)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
</group>
</group>
<label for="name"/>
<field name="name"/>
</form>
</field>
</record>
<record id="view_invoice_tax_tree" model="ir.ui.view">
<field name="name">account.invoice.tax.tree</field>
<field name="model">account.invoice.tax</field>
<field name="arch" type="xml">
<tree string="Manual Invoice Taxes">
<field name="sequence"/>
<field name="manual"/>
<field name="name"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="base"/>
<field name="amount"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</record>
<record id="view_invoice_tax_form" model="ir.ui.view">
<field name="name">account.invoice.tax.form</field>
<field name="model">account.invoice.tax</field>
<field name="arch" type="xml">
<form string="Manual Invoice Taxes">
<group col="4">
<field name="name"/>
<field name="sequence"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
<field name="manual"/>
<field name="amount"/>
<field name="base"/>
<field name="currency_id" invisible="1"/>
</group>
</form>
</field>
</record>
<record id="invoice_tree" model="ir.ui.view">
<field name="name">account.invoice.tree</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" decoration-muted="state == 'cancel'" string="Invoice">
<field name="partner_id" groups="base.group_user" string="Customer"/>
<field name="date_invoice"/>
<field name="number"/>
<field name="commercial_partner_id" invisible="1"/>
<field name="reference" invisible="1"/>
<field name="name" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="user_id"/>
<field name="date_due"/>
<field name="origin"/>
<field name="amount_total_signed" string="Total" sum="Total"/>
<field name="residual_signed" string="Amount Due" sum="Amount Due"/>
<field name="currency_id" invisible="1"/>
<field name="company_currency_id" invisible="1"/>
<field name="state"/>
<field name="type" invisible="context.get('type',True)"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="invoice_kanban">
<field name="name">account.invoice.kanban</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="number"/>
<field name="partner_id"/>
<field name="amount_total_signed"/>
<field name="date_invoice"/>
<field name="state"/>
<field name="currency_id"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div class="row">
<div class="col-xs-6">
<strong><span><t t-esc="record.partner_id.value"/></span></strong>
</div>
<div class="col-xs-6 pull-right text-right">
<strong><field name="amount_total_signed" widget="monetary"/></strong>
</div>
</div>
<div class="row">
<div class="col-xs-6 text-muted">
<span><t t-esc="record.number.value"/> <t t-esc="record.date_invoice.value"/></span>
</div>
<div class="col-xs-6">
<span class="pull-right text-right">
<field name="state" widget="kanban_label_selection" options="{'classes': {'draft': 'default', 'cancel': 'default', 'none': 'danger', 'proforma': 'warning', 'proforma2': 'warning', 'open': 'warning',
'paid': 'success'}}"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="invoice_supplier_tree" model="ir.ui.view">
<field name="name">account.invoice.supplier.tree</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" decoration-muted="state == 'cancel'" string="Invoice">
<field name="partner_id" groups="base.group_user" string="Vendor"/>
<field name="date_invoice" string="Bill Date"/>
<field name="number"/>
<field name="reference"/>
<field name="commercial_partner_id" invisible="1"/>
<field name="name" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="date_due"/>
<field name="origin"/>
<field name="amount_total_signed" string="Total" sum="Total"/>
<field name="residual_signed" string="To Pay" sum="To pay"/>
<field name="currency_id" invisible="1"/>
<field name="company_currency_id" invisible="1"/>
<field name="state"/>
<field name="type" invisible="context.get('type',True)"/>
</tree>
</field>
</record>
<record id="invoice_supplier_form" model="ir.ui.view">
<field name="name">account.invoice.supplier.form</field>
<field name="model">account.invoice</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="Vendor Bill">
<header>
<button name="action_invoice_open" type="object" states="draft,proforma2" string="Validate" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="%(action_account_invoice_payment)d" type="action" states="open" string="Register Payment" groups="account.group_account_invoice" class="oe_highlight"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' groups="account.group_account_invoice" attrs="{'invisible': ['|',('type', 'in', ['in_refund','out_refund']),('state','not in',('open','paid'))]}"/>
<button name="action_invoice_cancel" type="object" states="draft,proforma2" string="Cancel Bill" groups="account.group_account_invoice"/>
<button name="action_invoice_draft" states="cancel" string="Set to Draft" type="object" groups="account.group_account_invoice"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" />
</header>
<div class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('has_outstanding','=',False)]}">
You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding debits</a></bold> for this supplier. You can allocate them to mark this bill as paid.
</div>
<field name="has_outstanding" invisible="1"/>
<sheet string="Vendor Bill">
<div>
<label string="Draft Bill" attrs="{'invisible': ['|',('state','<>','draft'), ('type','<>','in_invoice')]}"/>
<label string="Draft Refund" attrs="{'invisible': ['|',('state','<>','draft'), ('type','<>','in_refund')]}"/>
<label string="Bill " attrs="{'invisible': ['|',('state', '=', 'draft'), ('type','<>','in_invoice')]}"/>
<label string="Refund " attrs="{'invisible': ['|',('state', '=', 'draft'), ('type','<>','in_refund')]}"/>
<h1 class="mt0">
<field name="number" class="oe_inline" attrs="{'invisible': [('state', '=', 'draft')]}"/>
</h1>
</div>
<field name="type" invisible="1"/>
<group>
<group>
<field string="Vendor" name="partner_id"
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
domain="[('supplier', '=', True)]"/>
<field name="reference" string="Vendor Reference"/>
</group>
<group>
<field name="origin" attrs="{'invisible': [('origin', '=', False)]}"/>
<field name="date_invoice" string="Bill Date"/>
<field name="date_due"/>
<field name="move_name" invisible="1"/>
<field name="currency_id" options="{'no_create': True, 'no_open': True}" groups="base.group_multi_currency"/>
<field name="company_currency_id" invisible="1"/>
</group>
</group>
<notebook>
<page string="Bill">
<field context="{'type': type, 'journal_id': journal_id}" name="invoice_line_ids">
<tree string="Bill lines" editable="bottom">
<field name="sequence" widget="handle" />
<field name="product_id"
context="{'partner_id': parent.partner_id}"/>
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('internal_type', '=', 'other'), ('deprecated', '=', False)]"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('company_id', '=', parent.company_id)]"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/>
<field name="quantity"/>
<field name="uom_id" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="discount" groups="base.group_no_one"/>
<field name="invoice_line_tax_ids" widget="many2many_tags" context="{'type':parent.type}"
domain="[('type_tax_use','=','purchase'),('company_id', '=', parent.company_id)]" options="{'no_create': True}"/>
<field name="price_subtotal"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
<group>
<group>
<div class="oe_inline">
<field name="tax_line_ids">
<tree editable="bottom" string="Taxes">
<field name="name"/>
<!--Need invisible fields for on_change to create all necessary info -->
<field name="tax_id" invisible="1"/>
<field name="sequence" invisible="1"/>
<field name="manual" invisible="1"/>
<field name="account_id" groups="account.group_account_invoice"/>
<field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
<field name="amount"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</div>
</group>
<group class="oe_subtotal_footer oe_right">
<field name="amount_untaxed"/>
<field name="amount_tax"/>
<field name="amount_total" class="oe_subtotal_footer_separator"/>
<field name="payments_widget" colspan="2" nolabel="1" widget="payment"/>
<field name="residual" class="oe_subtotal_footer_separator" attrs="{'invisible': [('state', '=', 'draft')]}"/>
<field name="reconciled" invisible="1"/>
<field name="outstanding_credits_debits_widget" colspan="2" nolabel="1" widget="payment" attrs="{'invisible': [('state', 'not in', 'open')]}"/>
</group>
</group>
<div>
<field name="comment" placeholder="Additional notes..."/>
</div>
</page>
<page string="Other Info">
<group>
<group>
<field name="journal_id" groups="account.group_account_user" options="{'no_create': True}"
attrs="{'readonly':[('move_name','!=',False)]}"/>
<field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" invisible="1"/>
<field name="user_id" string="Responsible"/>
<field domain="[('company_id', '=', company_id), ('internal_type', '=', 'payable'), ('deprecated', '=', False)]"
name="account_id" groups="account.group_account_manager"/>
<field name="name" invisible="1"/>
<field name="payment_term_id" options="{'no_create': True}" attrs="{'invisible': [('payment_term_id','=',False)]}"/>
</group>
<group>
<field name="fiscal_position_id" options="{'no_create': True}" placeholder="Auto-detect"/>
<field name="move_id" groups="account.group_account_manager" attrs="{'invisible': [('move_id', '=', False)]}"/>
<field name="date" domain="[('state', '=', 'draft'), ('company_id', '=', company_id)]" groups="account.group_account_user"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</group>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="invoice_form" model="ir.ui.view">
<field name="name">account.invoice.form</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<form string="Invoice">
<header>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
<button name="invoice_print" string="Print" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
<button name="invoice_print" string="Print Invoice" type="object" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
<button name="%(action_account_invoice_payment)d" type="action" states="open" string="Register Payment" groups="account.group_account_invoice" class="oe_highlight"/>
<button name="action_invoice_open" type="object" states="draft" string="Validate" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="action_invoice_open" type="object" states="proforma2" string="Validate" groups="account.group_account_invoice"/>
<button name="action_invoice_proforma2" type="object" states="draft" string="PRO-FORMA" groups="account.group_proforma_invoices"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' groups="account.group_account_invoice" attrs="{'invisible': ['|',('type', '=', 'out_refund'), ('state', 'not in', ('open','proforma2','paid'))]}"/>
<button name="action_invoice_cancel" type="object" states="draft,proforma2,open" string="Cancel Invoice" groups="base.group_no_one"/>
<button name="action_invoice_draft" states="cancel" string="Reset to Draft" type="object" groups="account.group_account_invoice"/>
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid"/>
</header>
<div class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('has_outstanding','=',False)]}">
You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding payments</a></bold> for this customer. You can allocate them to mark this invoice as paid.
</div>
<field name="has_outstanding" invisible="1"/>
<sheet string="Invoice">
<label string="Pro Forma Invoice" attrs="{'invisible': [('state','not in',('proforma','proforma2'))]}"/>
<label string="Refund" attrs="{'invisible': ['|',('state','in',('draft','proforma','proforma2')), ('type','<>','out_refund')]}"/>
<h1 class="mt0">
<label string="Draft Invoice" attrs="{'invisible': ['|',('state','not in',('draft',)), ('type','<>','out_invoice')]}"/>
<label string="Draft Refund" attrs="{'invisible': ['|',('state','not in',('draft',)), ('type','<>','out_refund')]}"/>
<field name="number" readonly="1" class="oe_inline" attrs="{'invisible': [('state','in',('draft',))]}"/>
</h1>
<field name="type" invisible="1"/>
<group>
<group>
<field string="Customer" name="partner_id"
context="{'search_default_customer':1, 'show_address': 1}"
options='{"always_reload": True}'
domain="[('customer', '=', True)]"/>
<field name="payment_term_id"/>
</group>
<group>
<field name="date_invoice"/>
<field name="move_name" invisible="1"/>
<field name="user_id" groups="base.group_user"/>
<label for="currency_id" groups="base.group_multi_currency"/>
<div groups="base.group_multi_currency">
<field name="currency_id" options="{'no_create': True, 'no_open': True}" class="oe_inline"/>
<field name="company_currency_id" invisible="1"/>
</div>
</group>
</group>
<field name="sent" invisible="1"/>
<notebook colspan="4">
<page string="Invoice Lines">
<field name="invoice_line_ids" nolabel="1" widget="one2many_list" mode="tree,kanban" context="{'type': type, 'journal_id': journal_id, 'default_invoice_id': id}">
<tree string="Invoice Lines" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="product_id"/>
<field name="origin" invisible="1"/>
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('internal_type', '=', 'other')]"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('company_id', '=', parent.company_id)]"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/>
<field name="quantity"/>
<field name="uom_id" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="discount" groups="base.group_no_one"/>
<field name="invoice_line_tax_ids" widget="many2many_tags" context="{'type':parent.type}"
domain="[('type_tax_use','=','sale'),('company_id', '=', parent.company_id)]" options="{'no_create': True}"/>
<field name="price_subtotal"/>
<field name="currency_id" invisible="1"/>
</tree>
<kanban class="o_kanban_mobile">
<field name="product_id"/>
<field name="price_subtotal"/>
<field name="quantity"/>
<field name="uom_id" groups="product.group_uom"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div class="row">
<div class="col-xs-12">
<strong><span><t t-esc="record.product_id.value or 'None'"/></span></strong>
</div>
</div>
<div class="row">
<div class="col-xs-8 text-muted">
<span><t t-esc="record.quantity.value"/> <t t-esc="record.uom_id.value"/></span>
</div>
<div class="col-xs-4 text-muted">
<span class="text-right"><t t-esc="record.price_subtotal.value"/></span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
<group class="oe_subtotal_footer oe_right">
<field name="amount_untaxed"/>
<field name="amount_tax"/>
<field name="amount_total" class="oe_subtotal_footer_separator"/>
<field name="payments_widget" colspan="2" nolabel="1" widget="payment"/>
<field name="residual" class="oe_subtotal_footer_separator" attrs="{'invisible': [('state', '=', 'draft')]}"/>
<field name="reconciled" invisible="1"/>
<field name="outstanding_credits_debits_widget" colspan="2" nolabel="1" widget="payment" attrs="{'invisible': [('state', 'not in', 'open')]}"/>
</group>
<field name="comment" placeholder="Terms and conditions..."/>
</page>
<page string="Other Info" name="other_info">
<group>
<group>
<field name="fiscal_position_id" options="{'no_create': True}" />
<field name="journal_id" groups="account.group_account_user"
options="{'no_create': True}" attrs="{'readonly':[('move_name','!=',False)]}"/>
<field domain="[('company_id', '=', company_id),('internal_type','=', 'receivable'), ('deprecated', '=', False)]"
name="account_id" groups="account.group_account_manager"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field domain="[('partner_id.ref_company_ids', 'in', [company_id])]" name="partner_bank_id" invisible="1"/>
<field name="date_due" groups="base.group_no_one"/>
</group>
<group>
<field name="move_id" groups="account.group_account_manager" attrs="{'invisible': [('move_id', '=', False)]}"/>
<field name="origin" groups="base.group_user" attrs="{'invisible': [('origin', '=', False)]}"/>
<field name="name"/>
</group>
</group>
<field name="tax_line_ids">
<tree editable="bottom" string="Taxes" create="0">
<field name="name"/>
<!--Need invisible fields for on_change to create all necessary info -->
<field name="tax_id" invisible="1"/>
<field name="account_analytic_id" invisible="1"/>
<field name="sequence" invisible="1"/>
<field name="manual" invisible="1"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="amount"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<!-- Custom reports (aka filters) -->
<record id="filter_invoice_salespersons" model="ir.filters">
<field name="name">By Salespersons</field>
<field name="model_id">account.invoice</field>
<field name="user_id" eval="False"/>
<field name="context">{'group_by': ['date_invoice:month', 'user_id']}</field>
</record>
<record id="view_account_invoice_filter" model="ir.ui.view">
<field name="name">account.invoice.select</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<search string="Search Invoice">
<field name="number" string="Invoice" filter_domain="['|','|','|', ('number','ilike',self), ('origin','ilike',self), ('reference', 'ilike', self), ('partner_id', 'child_of', self)]"/>
<field name="journal_id" />
<filter name="draft" string="Draft" domain="[('state','in',('draft', 'proforma'))]"/>
<filter name="proforma" string="Proforma" domain="[('state','=','proforma2')]" groups="account.group_proforma_invoices"/>
<filter name="invoices" string="Invoices" domain="['&', ('state','in',['open','paid']),('type','in',('out_invoice','in_invoice'))]"/>
<filter name="refunds" string="Refunds" domain="['&', ('state','in',['open','paid']),('type','in',('out_refund','in_refund'))]"/>
<separator/>
<filter name="unpaid" string="Not Paid" domain="[('state','=','open')]"/>
<filter name="late" string="Overdue" domain="['&', ('date_due', '<', time.strftime('%%Y-%%m-%%d')), ('state', '=', 'open')]" help="Overdue invoices, maturity date passed"/>
<separator/>
<field name="partner_id" operator="child_of"/>
<field name="user_id" string="Salesperson"/>
<field name="date" string="Period"/>
<separator/>
<filter domain="[('user_id','=',uid)]" help="My Invoices"/>
<group expand="0" string="Group By">
<filter name="group_by_partner_id" string="Partner" context="{'group_by':'commercial_partner_id'}"/>
<filter string="Salesperson" context="{'group_by':'user_id'}"/>
<filter name="status" string="Status" context="{'group_by':'state'}"/>
<separator/>
<filter string="Invoice Date" context="{'group_by':'date_invoice'}"/>
<filter string="Due Date" context="{'group_by':'date_due'}"/>
</group>
</search>
</field>
</record>
<record id="action_invoice_tree" model="ir.actions.act_window">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_id" ref="invoice_tree"/>
<field name="context">{'type':'out_invoice'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_refund_out_tree" model="ir.actions.act_window">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,kanban,calendar,graph,pivot</field>
<field name="view_id" ref="invoice_tree"/>
<field name="domain">[('type','in', ['out_invoice', 'out_refund']), ('state', 'not in', ['draft', 'cancel'])]</field>
<field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_refund_out_tree_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="invoice_tree"/>
<field name="act_window_id" ref="action_invoice_refund_out_tree"/>
</record>
<record id="action_invoice_refund_out_tree_form" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="invoice_form"/>
<field name="act_window_id" ref="action_invoice_refund_out_tree"/>
</record>
<record id="action_invoice_tree_pending_invoice" model="ir.actions.act_window">
<field name="name">Pending Invoice</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_id" ref="invoice_tree"/>
<field name="context">{'type':'out_invoice'}</field>
<field name="domain">[('state','=','draft')]</field>
<!-- <field name="search_view_id" ref="view_account_invoice_filter"/>-->
</record>
<record id="action_invoice_tree_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="act_window_id" ref="action_invoice_tree"/>
</record>
<record id="action_invoice_tree_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="invoice_form"/>
<field name="act_window_id" ref="action_invoice_tree"/>
</record>
<record id="action_invoice_tree1" model="ir.actions.act_window">
<field name="name">Customer Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','in',('out_invoice', 'out_refund'))]</field>
<field name="context">{'type':'out_invoice', 'journal_type': 'sale'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a customer invoice.
</p><p>
Odoo's electronic invoicing allows to ease and fasten the
collection of customer payments. Your customer receives the
invoice by email and he can pay online and/or import it
in his own system.
</p><p>
The discussions with your customer are automatically displayed at
the bottom of each invoice.
</p>
</field>
</record>
<record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="invoice_tree"/>
<field name="act_window_id" ref="action_invoice_tree1"/>
</record>
<record id="action_invoice_tree1_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="invoice_form"/>
<field name="act_window_id" ref="action_invoice_tree1"/>
</record>
<menuitem action="action_invoice_tree1" id="menu_action_invoice_tree1" parent="menu_finance_receivables" sequence="1"/>
<record id="action_invoice_tree2" model="ir.actions.act_window">
<field name="name">Vendor Bills</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','in',('in_invoice', 'in_refund'))]</field>
<field name="context">{'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to record a new vendor bill.
</p><p>
You can control the invoice from your vendor according to
what you purchased or received.
</p>
</field>
</record>
<record id="action_invoice_supplier_tree1_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="invoice_supplier_tree"/>
<field name="act_window_id" ref="action_invoice_tree2"/>
</record>
<record id="action_invoice__supplier_tree1_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="invoice_supplier_form"/>
<field name="act_window_id" ref="action_invoice_tree2"/>
</record>
<menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="menu_finance_payables" sequence="1"/>
<act_window
id="act_account_journal_2_account_invoice_opened"
name="Unpaid Invoices"
context="{'search_default_journal_id': [active_id], 'search_default_unpaid':1, 'default_journal_id': active_id}"
domain="[('journal_id','=', active_id)]"
res_model="account.invoice"
src_model="account.journal"/>
</data>
</odoo>