1
<?xml version="1.0" encoding="UTF-8"?>
4
<record id="account_voucher.view_voucher_filter_vendor" model="ir.ui.view">
5
<field name="name">account.voucher.purchase.select</field>
6
<field name="model">account.voucher</field>
7
<field name="type">search</field>
8
<field name="arch" type="xml">
9
<search string="Search Vouchers">
11
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
12
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
13
<separator orientation="vertical"/>
14
<filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
15
<separator orientation="vertical"/>
17
<field name="number"/>
18
<field name="partner_id" string="Supplier"/>
22
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/>
23
<field name="period_id" groups="base.group_extended"/>
26
<group expand="0" string="Group By...">
27
<filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
28
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
29
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
30
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
36
<record id="account_voucher.view_voucher_filter_sale" model="ir.ui.view">
37
<field name="name">account.voucher.sale.select</field>
38
<field name="model">account.voucher</field>
39
<field name="type">search</field>
40
<field name="arch" type="xml">
41
<search string="Search Vouchers">
43
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
44
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
45
<separator orientation="vertical"/>
46
<filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
47
<separator orientation="vertical"/>
49
<field name="number"/>
50
<field name="partner_id" string="Customer"/>
54
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/>
55
<field name="period_id" groups="base.group_extended"/>
58
<group expand="0" string="Group By...">
59
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
60
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
61
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
62
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
68
<record id="account_voucher.act_pay_voucher" model="ir.actions.act_window">
69
<field name="name">Customer Payment</field>
70
<field name="res_model">account.voucher</field>
71
<field name="view_type">form</field>
72
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field>
73
<field name="context">{'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field>
74
<field name="view_id" ref="account_voucher.view_vendor_receipt_form"/>
75
<field name="target">current</field>
78
<record model="ir.ui.view" id="account_voucher.view_sale_receipt_form">
79
<field name="name">account.voucher.sale.form</field>
80
<field name="model">account.voucher</field>
81
<field name="type">form</field>
82
<field name="arch" type="xml">
83
<form string="Sales Receipt">
84
<group col="6" colspan="4">
85
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer"/>
86
<field name="date" on_change="onchange_date(date, currency_id, amount, context)"/>
87
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id, date, amount, type, context)"/>
88
<field name="number"/>
89
<field name="name" colspan="2"/>
90
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
91
<field name="type" invisible="True"/>
92
<field name="currency_id"/>
94
<notebook colspan="4">
95
<page string="Sales Information">
96
<field name="line_cr_ids" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
97
<tree string="Sales Lines" editable="bottom">
98
<field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection"/>
100
<field name="amount" sum="Total"/>
101
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
104
<group col="2" colspan="3">
105
<separator string="Internal Notes" colspan="2"/>
106
<field name="narration" colspan="2" nolabel="1"/>
108
<group col="2" colspan="1">
109
<group col="2" colspan="1">
110
<separator string="Payment Options" colspan="2"/>
111
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
112
<field name="account_id"
113
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
114
domain="[('type','=','liquidity')]"/>
115
<!-- should select income accounts only. Or use the journal for this ? -->
116
<field name="reference"
117
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
119
<field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
120
<field name="paid" invisible="1"/>
122
<group col="4" colspan="1">
123
<separator string="Total" colspan="4"/>
124
<field name="tax_id" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" groups="base.group_extended" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
125
<label string="" colspan="1"/><field name="amount" string="Total"/>
129
<page string="Journal Items" groups="base.group_extended" attrs="{'invisible': [('state','!=','posted')]}">
130
<group col="6" colspan="4">
131
<field name="period_id"/>
132
<field name="audit"/>
134
<field name="move_ids" colspan="4" nolabel="1" readonly="1">
135
<tree string="Journal Items">
136
<field name="move_id"/>
139
<field name="statement_id"/>
140
<field name="partner_id"/>
141
<field name="account_id"/>
143
<field name="debit"/>
144
<field name="credit"/>
145
<field name="state"/>
146
<field name="reconcile_id"/>
151
<group col="8" colspan="4">
152
<field name="state"/> <!-- widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/-->
153
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
154
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
155
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
156
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">
157
<button icon="terp-dolar_ok!" name="%(account_voucher.act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
159
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
165
<!-- Sales Voucher -->
166
<record id="account_voucher.action_sale_receipt" model="ir.actions.act_window">
167
<field name="name">Sales Receipt</field>
168
<field name="res_model">account.voucher</field>
169
<field name="view_type">form</field>
170
<field name="domain">[('journal_id.type','in',['sale','sale_refund']), ('type','=','sale')]</field>
171
<field name="context">{'type':'sale'}</field>
172
<field name="view_id" eval="False"/>
173
<field name="search_view_id" ref="account_voucher.view_voucher_filter_sale"/>
174
<field name="target">current</field>
175
<field name="help">When you sell products to a customer, you can give him a sales receipt or an invoice. When the sales receipt is confirmed, it creates journal items automatically and you can record the customer payment related to this sales receipt.</field>
177
<record id="account_voucher.action_sale_receipt_tree" model="ir.actions.act_window.view">
178
<field eval="1" name="sequence"/>
179
<field name="view_mode">tree</field>
180
<field name="act_window_id" ref="account_voucher.action_sale_receipt"/>
182
<record id="account_voucher.action_sale_receipt_form" model="ir.actions.act_window.view">
183
<field eval="2" name="sequence"/>
184
<field name="view_mode">form</field>
185
<field name="view_id" ref="account_voucher.view_sale_receipt_form"/>
186
<field name="act_window_id" ref="account_voucher.action_sale_receipt"/>
189
<menuitem id="account_voucher.menu_action_sale_receipt" icon="STOCK_JUSTIFY_FILL"
190
action="action_sale_receipt"
191
parent="account.menu_finance_receivables"
192
groups="base.group_extended"
195
<!-- Purchase Vouchers -->
196
<record id="account_voucher.act_pay_bills" model="ir.actions.act_window">
197
<field name="name">Bill Payment</field>
198
<field name="res_model">account.voucher</field>
199
<field name="view_type">form</field>
200
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field>
201
<field name="context">{'type':'payment', 'partner_id': partner_id, 'default_reference':reference}</field>
202
<field name="view_id" ref="account_voucher.view_vendor_payment_form"/>
203
<field name="target">current</field>
205
<record model="ir.ui.view" id="account_voucher.view_purchase_receipt_form">
206
<field name="name">account.voucher.purchase.form</field>
207
<field name="model">account.voucher</field>
208
<field name="type">form</field>
209
<field name="arch" type="xml">
210
<form string="Supplier Voucher">
211
<group col="6" colspan="4">
212
<field name="partner_id" domain="[('supplier','=',True)]" required="1" string="Supplier" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)"/>
213
<field name="date" string="Bill Date" select="1" on_change="onchange_date(date, currency_id, amount, context)"/>
214
<field name="journal_id" domain="[('type','in',['purchase','purchase_refund'])]" widget="selection" select="1" on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, context)"/>
215
<field name="number"/>
216
<field name="name" colspan="2"/>
217
<field name="reference" select="1"/>
218
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
219
<field name="account_id" domain="[('type','=','other')]" invisible="True"/>
220
<field name="type" invisible="True"/>
221
<field name="currency_id"/>
223
<notebook colspan="4">
224
<page string="Bill Information">
225
<field name="line_dr_ids" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" default_get="{'journal_id':journal_id,'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
226
<tree string="Expense Lines" editable="bottom">
227
<field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]"/>
229
<field name="amount"/>
230
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
233
<group col="2" colspan="3">
234
<separator string="Internal Notes" colspan="2"/>
235
<field name="narration" colspan="2" nolabel="1"/>
237
<group col="2" colspan="1">
238
<group col="2" colspan="1">
239
<separator string="Payment Terms" colspan="2"/>
240
<field name="date_due"/>
241
<field name="paid" invisible="1"/>
243
<group col="4" colspan="1">
244
<separator string="Total" colspan="4"/>
245
<field name="tax_id" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" groups="base.group_extended" attrs="{'invisible': [('state','!=','draft')]}"/>
246
<label string="" colspan="1"/><field name="amount" string="Total"/>
250
<page string="Journal Items" groups="base.group_extended" attrs="{'invisible': [('state','!=','posted')]}">
251
<group col="6" colspan="4">
252
<field name="period_id"/>
253
<field name="audit"/>
255
<field name="move_ids" colspan="4" nolabel="1" readonly="1">
256
<tree string="Journal Items">
257
<field name="move_id"/>
260
<field name="statement_id"/>
261
<field name="partner_id"/>
262
<field name="account_id"/>
264
<field name="debit"/>
265
<field name="credit"/>
266
<field name="state"/>
267
<field name="reconcile_id"/>
272
<group col="10" colspan="4">
273
<field name="state" /> <!-- widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/-->
274
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
275
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
276
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">
277
<button icon="terp-dolar_ok!" name="%(account_voucher.act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
279
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
280
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
285
<record id="account_voucher.action_purchase_receipt" model="ir.actions.act_window">
286
<field name="name">Purchase Receipt</field>
287
<field name="res_model">account.voucher</field>
288
<field name="view_type">form</field>
289
<field name="domain">[('journal_id.type','in',['purchase','purchase_refund']), ('type','=','purchase')]</field>
290
<field name="context">{'type':'purchase'}</field>
291
<field name="view_id" eval="False"/>
292
<field name="search_view_id" ref="account_voucher.view_voucher_filter_vendor"/>
293
<field name="target">current</field>
295
<record id="account_voucher.action_purchase_receipt_tree" model="ir.actions.act_window.view">
296
<field eval="1" name="sequence"/>
297
<field name="view_mode">tree</field>
298
<field name="act_window_id" ref="account_voucher.action_purchase_receipt"/>
300
<record id="account_voucher.action_purchase_receipt_form" model="ir.actions.act_window.view">
301
<field eval="2" name="sequence"/>
302
<field name="view_mode">form</field>
303
<field name="view_id" ref="account_voucher.view_purchase_receipt_form"/>
304
<field name="act_window_id" ref="account_voucher.action_purchase_receipt"/>
307
<menuitem id="account_voucher.menu_action_purchase_receipt" icon="STOCK_JUSTIFY_FILL"
308
action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="10"
309
groups="base.group_extended"/>