forked from OCA/l10n-italy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
account_view.xml
283 lines (267 loc) · 18.4 KB
/
account_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
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="corrispettivi_tree" model="ir.ui.view">
<field name="name">account.corrispettivi.tree</field>
<field name="model">account.invoice</field>
<field name="priority" eval="17"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Corrispettivi">
<field name="date_invoice" string="Date"/>
<field name="number"/>
<field name="partner_id" groups="base.group_erp_manager"/>
<field name="name"/>
<field name="journal_id" invisible="1"/>
<field name="period_id" invisible="1" groups="account.group_account_user"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="user_id"/>
<field name="date_due" groups="base.group_erp_manager"/>
<field name="origin" groups="base.group_erp_manager"/>
<field name="currency_id"/>
<field name="residual" sum="Residual Amount"/>
<field name="amount_untaxed" sum="Untaxed Amount"/>
<field name="amount_total" sum="Total Amount"/>
<field name="state"/>
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
</tree>
</field>
</record>
<record id="corrispettivi_form" model="ir.ui.view">
<field name="name">account.corrispettivi.form</field>
<field name="model">account.invoice</field>
<field name="priority" eval="17"/>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Corrispettivo" version="7.0">
<header>
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight" groups="base.group_user"/>
<button name="invoice_cancel" states="draft,open" string="Cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" groups="base.group_user"/>
<button name='%(account.action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','<>','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid"/>
</header>
<sheet string="Corrispettivo">
<h1>
<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')]}"/>
<label string="Invoice " attrs="{'invisible': ['|',('state','in',('draft','proforma','proforma2')), ('type','<>','out_invoice')]}"/>
<label string="Refund " attrs="{'invisible': ['|',('state','in',('draft','proforma','proforma2')), ('type','<>','out_refund')]}"/>
<field name="number" readonly="1" class="oe_inline"/>
</h1>
<field name="type" invisible="1"/>
<group>
<group>
<field string="Customer" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
groups="base.group_user" context="{'search_default_corrispettivi':1, 'show_address': 1}"
options='{"always_reload": True}'/>
<field name="fiscal_position" widget="selection" />
<field name="corrispettivo" on_change="onchange_corrispettivo(corrispettivo)"/>
</group>
<group>
<field name="date_invoice"/>
<field name="journal_id" groups="account.group_account_user"
on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]"
name="account_id" groups="account.group_account_user"/>
<label for="currency_id" groups="base.group_multi_currency"/>
<div groups="base.group_multi_currency">
<field name="currency_id" class="oe_inline"/>
</div>
</group>
</group>
<field name="sent" invisible="1"/>
<notebook colspan="4">
<page string="Invoice Lines">
<field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}">
<tree string="Invoice Lines" editable="bottom">
<field name="product_id"
on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_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), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
<field name="quantity"/>
<field name="uos_id" groups="product.group_uom"
on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="invoice_line_tax_id" widget="many2many_tags" context="{'type':parent.type}"
domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal"/>
</tree>
</field>
<group class="oe_subtotal_footer oe_right">
<field name="amount_untaxed" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<div>
<label for="amount_tax"/>
<button name="button_reset_taxes" states="draft,proforma2"
string="(update)" class="oe_link oe_edit_only"
type="object" help="Recompute taxes and total"/>
</div>
<field name="amount_tax" nolabel="1" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="amount_total" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="residual" groups="account.group_account_user" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="reconciled" invisible="1"/>
</group>
<group>
<field name="payment_term" class="oe_inline"/>
</group>
<div class="oe_clear">
<label for="comment"/>
</div>
<field name="comment" class="oe_inline" placeholder="Additional notes..."/>
</page>
<page string="Other Info">
<group col="4">
<group>
<field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
<field name="user_id" groups="base.group_user"/>
<field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"/>
<field name="period_id" domain="[('state', '=', 'draft'), ('company_id', '=', company_id)]"
groups="account.group_account_manager"
string="Accounting Period"
placeholder="force period"/>
<field name="date_due"/>
</group>
<group>
<field name="origin" groups="base.group_user"/>
<field name="name" string="Customer Reference"/>
<field name="move_id" groups="account.group_account_user"/>
</group>
</group>
<field name="tax_line">
<tree editable="bottom" string="Taxes">
<field name="name"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
<field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
<field invisible="True" name="base_amount"/>
<field invisible="True" name="tax_amount"/>
<field name="factor_base" invisible="True"/>
<field name="factor_tax" invisible="True"/>
</tree>
</field>
</page>
<page string="Payments" groups="base.group_user">
<field name="payment_ids">
<tree string="Payments">
<field name="date"/>
<field name="move_id"/>
<field name="ref"/>
<field name="name"/>
<field name="journal_id" groups="base.group_user"/>
<field name="debit"/>
<field name="credit"/>
<field name="amount_currency" groups="base.group_multi_currency"/>
<field name="currency_id" groups="base.group_multi_currency"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</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="type">form</field>
<field name="inherit_id" ref="account.invoice_form"></field>
<field name="arch" type="xml">
<field name="company_id" position="replace">
<field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id,context)" widget="selection" groups="base.group_multi_company"/>
</field>
</field>
</record>
<record id="view_account_corrispettivi_filter" model="ir.ui.view">
<field name="name">account.corrispettivi.select</field>
<field name="model">account.invoice</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Corrispettivi">
<group col="10" colspan="4">
<filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
<filter name="invoices" icon="terp-dolar" string="Corrispettivi" domain="[('state','not in',['draft','cancel'])]" help="Open/Paid"/>
<separator orientation="vertical"/>
<filter name="unpaid" icon="terp-dolar_ok!" string="Unpaid" domain="[('state','=','open')]" help="Unpaid"/>
<separator orientation="vertical"/>
<field name="number"/>
<field name="user_id" select="1" widget="selection" string="Salesman">
<filter domain="[('user_id','=',uid)]" help="My invoices" icon="terp-personal" separator="1"/>
</field>
<field name="amount_total"/>
</group>
<newline/>
<group col="10" colspan="4">
<field name="journal_id" widget="selection" select='1'/>
<field name="period_id" select='1' string="Period"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_invoice'}"/>
</group>
</search>
</field>
</record>
<record id="action_corrispettivi_tree" model="ir.actions.act_window">
<field name="name">Corrispettivi</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','out_invoice'),('corrispettivo','=',True)]</field>
<field name="context" eval="{'default_type':'out_invoice', 'dafault_journal_type': 'sale', 'default_corrispettivo': True, 'default_partner_id':ref('partner_corrispettivi')}"/>
<field name="search_view_id" ref="view_account_corrispettivi_filter"/>
</record>
<record id="account.action_invoice_tree1" model="ir.actions.act_window">
<field name="domain">[('type','=','out_invoice'),('corrispettivo','=', False)]</field>
</record>
<record id="action_corrispettivi_tree_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="corrispettivi_tree"/>
<field name="act_window_id" ref="action_corrispettivi_tree"/>
</record>
<record id="action_corrispettivi_tree_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="corrispettivi_form"/>
<field name="act_window_id" ref="action_corrispettivi_tree"/>
</record>
<menuitem action="action_corrispettivi_tree" id="menu_action_corrispettivi_tree" parent="account.menu_finance_receivables"/>
<!-- partner -->
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="supplier" position="after">
<field name="corrispettivi" groups="account.group_account_manager"/>
</field>
</field>
</record>
<!-- journal -->
<record id="view_account_journal_form" model="ir.ui.view">
<field name="name">account.journal.form</field>
<field name="model">account.journal</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="allow_date" position="after">
<field name="corrispettivi"/>
</field>
</field>
</record>
</data>
</openerp>