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
|
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--
Delete some field from account_invoice tree:
- Salesman or User (user_id)
- Total amount (amount_total)
- Untaxed (amount_untaxed)
Add some elements:
- Document date
-->
<record id="inherit_invoice_tree" model="ir.ui.view">
<field name="name">inherit.invoice.tree</field>
<field name="model">account.invoice</field>
<field name="type">tree</field>
<field name="inherit_id" ref="account.invoice_tree"/>
<field name="priority">17</field>
<field name="arch" type="xml">
<data>
<xpath expr="/tree/field[@name='date_invoice']" position="before">
<field name="document_date"/>
</xpath>
<xpath expr="/tree/field[@name='user_id']" position="replace">
</xpath>
<xpath expr="/tree/field[@name='amount_untaxed']" position="replace">
</xpath>
<xpath expr="/tree/field[@name='residual']" position="attributes">
<attribute name="sum"></attribute>
</xpath>
<xpath expr="/tree/field[@name='amount_total']" position="attributes">
<attribute name="sum"></attribute>
</xpath>
</data>
</field>
</record>
<!--
Delete some element from Search views:
- Salesman or user (user_id)
- Total (amount_total)
- Responsible button (group by)
- Proforma button
- Invoices button
- Unpaid button
And add some ones:
- Open button
- Paid button
-->
<record id="inherit_view_account_invoice_filter" model="ir.ui.view">
<field name="name">inherit.view.account.invoice.filter</field>
<field name="model">account.invoice</field>
<field name="type">search</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="priority">17</field>
<field name="arch" type="xml">
<data>
<xpath expr="/search/group[1]/filter[@name='proforma']" position="replace">
</xpath>
<xpath expr="/search/group[1]/filter[@name='invoices']" position="replace">
</xpath>
<xpath expr="/search/group[1]/filter[@name='unpaid']" position="attributes">
<attribute name="string">Open</attribute>
<attribute name="help">Open Invoices</attribute>
</xpath>
<xpath expr="/search/group[1]/field[@name='user_id']" position="replace">
</xpath>
<xpath expr="/search/group[3]/filter[@string='Responsible']" position="replace">
</xpath>
<xpath expr="/search/group[1]/separator[1]" position="replace">
</xpath>
<xpath expr="/search/group[1]/filter[@name='unpaid']" position="after">
<filter name="paid" icon="terp-dolar" string="Paid" domain="[('state', '=', 'paid')]"/>
</xpath>
</data>
</field>
</record>
<!--
Delete total from Search view for Sales Receipt and Supplier Vouchers (from account_voucher module)
-->
<record id="inherit_view_voucher_tree" model="ir.ui.view">
<field name="name">inherit.view.voucher.tree</field>
<field name="model">account.voucher</field>
<field name="type">tree</field>
<field name="inherit_id" ref="account_voucher.view_voucher_tree"/>
<field name="arch" type="xml">
<data>
<xpath expr="/tree/field[@name='amount']" position="attributes">
<attribute name="sum"></attribute>
</xpath>
</data>
</field>
</record>
<!--
Delete some elements from Stock transfer voucher (customer invoices):
- period_id
- label with "keep empty…"
Add some others elements:
- document_date
-->
<record id="invoice_form_4" model="ir.ui.view">
<field name="name">account.invoice.supplier.form.4</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="priority">22</field>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='date_invoice']" position="before">
<field name="document_date"/>
</xpath>
<xpath expr="//field[@name='period_id']" position="replace">
</xpath>
<xpath expr="//label[@string='(keep empty to use the current period)']" position="replace">
</xpath>
</data>
</field>
</record>
<!-- Delete payment lines link from invoices -->
<delete model="ir.actions.act_window" search="[('name', 'ilike', '%Payment Lines%')]"/>
</data>
</openerp>
|