1 <?xml version="1.0" encoding="UTF-8"?>
4 <record id="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 <field name="number" string="Voucher"/>
12 <separator orientation="vertical"/>
14 <separator orientation="vertical"/>
15 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
16 <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
17 <separator orientation="vertical"/>
18 <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('state','=','posted')]" help="To Review"/>
19 <separator orientation="vertical"/>
20 <field name="partner_id" string="Supplier"/>
21 <field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/>
22 <field name="period_id"/>
25 <group expand="0" string="Group By...">
26 <filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
27 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
28 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
29 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
35 <record id="view_voucher_filter_sale" model="ir.ui.view">
36 <field name="name">account.voucher.sale.select</field>
37 <field name="model">account.voucher</field>
38 <field name="type">search</field>
39 <field name="arch" type="xml">
40 <search string="Search Vouchers">
42 <field name="number" string="Voucher"/>
43 <separator orientation="vertical"/>
45 <separator orientation="vertical"/>
46 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
47 <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
48 <separator orientation="vertical"/>
49 <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('state','=','posted')]" help="To Review"/>
50 <separator orientation="vertical"/>
51 <field name="partner_id" string="Customer"/>
52 <field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/>
53 <field name="period_id"/>
56 <group expand="0" string="Group By...">
57 <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
58 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
59 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
60 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
66 <record id="act_pay_voucher" model="ir.actions.act_window">
67 <field name="name">Customer Payment</field>
68 <field name="res_model">account.voucher</field>
69 <field name="view_type">form</field>
70 <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field>
71 <field name="context">{'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field>
72 <field name="view_id" ref="view_vendor_receipt_form"/>
73 <field name="target">current</field>
76 <record model="ir.ui.view" id="view_sale_receipt_form">
77 <field name="name">account.voucher.sale.form</field>
78 <field name="model">account.voucher</field>
79 <field name="type">form</field>
80 <field name="arch" type="xml">
83 <button name="proforma_voucher" string="Validate" states="draft"/>
84 <button name="%(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'),'|',('state','=','draft'), ('paid','=',True)]}"/>
85 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
86 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
87 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
88 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
90 <sheet string="Sales Receipt" layout="auto">
91 <div class="oe_title">
92 <label for="number" class="oe_edit_only"/>
93 <h1><field name="number" readonly="0" /></h1>
98 <field name="partner_id" domain="[('customer','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
99 <field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
100 <field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
101 <field name="name" colspan="2"/>
102 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
105 <field name="currency_id"/>
106 <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, company_id, context)"/>
107 <field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
108 <field name="account_id"
109 attrs="{'invisible':[('pay_now','!=','pay_now')]}"
110 domain="[('type','=','liquidity')]"/>
111 <field name="reference"
112 attrs="{'invisible':[('pay_now','!=','pay_now')]}"
114 <field name="paid" invisible="1"/>
116 <field name="type" invisible="True"/>
119 <page string="Sales Information">
120 <field name="line_cr_ids" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
121 <tree string="Sales Lines" editable="bottom">
122 <field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection"/>
124 <field name="amount" sum="Total"/>
125 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
130 <field name="narration" placeholder="Internal Notes" nolabel="1" />
133 <group class="oe_subtotal_footer" string="Total">
135 on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
137 domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
138 <field name="tax_amount" nolabel="1"/>
139 <field name="amount" class="oe_subtotal_footer_separator" />
140 <button type="object"
141 icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax"
142 attrs="{'invisible': [('state','!=','draft')]}"/>
147 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
149 <field name="period_id"/>
150 <field name="audit"/>
152 <field name="move_ids" readonly="1">
153 <tree string="Journal Items">
154 <field name="move_id"/>
157 <field name="statement_id"/>
158 <field name="partner_id"/>
159 <field name="account_id"/>
161 <field name="debit"/>
162 <field name="credit"/>
163 <field name="state"/>
164 <field name="reconcile_id"/>
174 <!-- Sales Voucher -->
175 <record id="action_sale_receipt" model="ir.actions.act_window">
176 <field name="name">Sales Receipt</field>
177 <field name="res_model">account.voucher</field>
178 <field name="view_type">form</field>
179 <field name="domain">[('journal_id.type','in',['sale','sale_refund']), ('type','=','sale')]</field>
180 <field name="context">{'default_type': 'sale', 'type': 'sale'}</field>
181 <field name="view_id" eval="False"/>
182 <field name="search_view_id" ref="view_voucher_filter_sale"/>
183 <field name="target">current</field>
184 <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>
186 <record id="action_sale_receipt_tree" model="ir.actions.act_window.view">
187 <field eval="1" name="sequence"/>
188 <field name="view_mode">tree</field>
189 <field name="act_window_id" ref="action_sale_receipt"/>
191 <record id="action_sale_receipt_form" model="ir.actions.act_window.view">
192 <field eval="2" name="sequence"/>
193 <field name="view_mode">form</field>
194 <field name="view_id" ref="view_sale_receipt_form"/>
195 <field name="act_window_id" ref="action_sale_receipt"/>
198 <menuitem id="menu_action_sale_receipt" icon="STOCK_JUSTIFY_FILL"
199 action="action_sale_receipt"
200 parent="account.menu_finance_receivables"
203 <!-- Purchase Vouchers -->
204 <record id="act_pay_bills" model="ir.actions.act_window">
205 <field name="name">Bill Payment</field>
206 <field name="res_model">account.voucher</field>
207 <field name="view_type">form</field>
208 <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field>
209 <field name="context">{'default_type':'payment', 'type':'payment', 'default_partner_id': partner_id, 'partner_id': partner_id, 'default_reference':reference}</field>
210 <field name="view_id" ref="view_vendor_payment_form"/>
211 <field name="target">current</field>
213 <record model="ir.ui.view" id="view_purchase_receipt_form">
214 <field name="name">account.voucher.purchase.form</field>
215 <field name="model">account.voucher</field>
216 <field name="type">form</field>
217 <field name="arch" type="xml">
220 <button name="proforma_voucher" string="Validate" states="draft"/>
221 <button name="%(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'),'|',('state','=','draft'), ('paid','=',True)]}"/>
222 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
223 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
224 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
225 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
227 <sheet string="Supplier Voucher">
228 <div class="oe_title">
229 <label for="number" class="oe_edit_only"/>
230 <h1><field name="number" readonly="0" /></h1>
233 <field name="pay_now" invisible="1"/>
236 <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)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" />
237 <field name="date" string="Bill Date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
238 <field name="date_due"/>
239 <field name="name" colspan="2"/>
243 <field name="paid" invisible="1"/>
244 <field name="currency_id"/>
245 <field name="journal_id"
246 domain="[('type','in',['purchase','purchase_refund'])]"
248 on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/>
249 <field name="reference"/>
250 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
255 <field name="account_id" domain="[('type','=','other')]" invisible="True"/>
256 <field name="type" invisible="True"/>
258 <notebook colspan="4">
259 <page string="Bill Information">
260 <field name="line_dr_ids" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" context="{'journal_id':journal_id,'partner_id':partner_id}">
261 <tree string="Expense Lines" editable="bottom">
262 <field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]"/>
264 <field name="amount"/>
265 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
270 <field name="narration" placeholder="Internal Notes" nolabel="1" />
272 <group class="oe_subtotal_footer">
275 <label for="tax_id" />
276 <button type="object"
277 icon="terp-stock_format-scientific"
279 attrs="{'invisible': [('state','!=','draft')]}"/>
283 on_change="onchange_price(line_dr_ids, tax_id, partner_id)"
285 domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"
287 <field name="tax_amount" />
288 <field name="amount" string="Total" class="oe_subtotal_footer_separator"/>
293 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
295 <field name="period_id"/>
296 <field name="audit"/>
298 <field name="move_ids" readonly="1">
299 <tree string="Journal Items">
300 <field name="move_id"/>
303 <field name="statement_id"/>
304 <field name="partner_id"/>
305 <field name="account_id"/>
307 <field name="debit"/>
308 <field name="credit"/>
309 <field name="state"/>
310 <field name="reconcile_id"/>
319 <record id="action_purchase_receipt" model="ir.actions.act_window">
320 <field name="name">Purchase Receipt</field>
321 <field name="res_model">account.voucher</field>
322 <field name="view_type">form</field>
323 <field name="domain">[('journal_id.type','in',['purchase','purchase_refund']), ('type','=','purchase')]</field>
324 <field name="context">{'default_type': 'purchase', 'type': 'purchase'}</field>
325 <field name="view_id" eval="False"/>
326 <field name="search_view_id" eval="view_voucher_filter_vendor"/>
327 <field name="target">current</field>
329 <record id="action_purchase_receipt_tree" model="ir.actions.act_window.view">
330 <field eval="1" name="sequence"/>
331 <field name="view_mode">tree</field>
332 <field name="act_window_id" ref="action_purchase_receipt"/>
334 <record id="action_purchase_receipt_form" model="ir.actions.act_window.view">
335 <field eval="2" name="sequence"/>
336 <field name="view_mode">form</field>
337 <field name="view_id" ref="view_purchase_receipt_form"/>
338 <field name="act_window_id" ref="action_purchase_receipt"/>
341 <menuitem id="menu_action_purchase_receipt" icon="STOCK_JUSTIFY_FILL"
342 action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="10"/>