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">
10 <field name="number" string="Voucher"/>
12 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
13 <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
14 <field name="partner_id" string="Supplier"/>
15 <field name="journal_id" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/>
16 <field name="period_id"/>
17 <group expand="0" string="Group By...">
18 <filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
19 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
20 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
21 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
27 <record id="view_voucher_filter_sale" model="ir.ui.view">
28 <field name="name">account.voucher.sale.select</field>
29 <field name="model">account.voucher</field>
30 <field name="type">search</field>
31 <field name="arch" type="xml">
32 <search string="Search Vouchers">
33 <field name="number" string="Voucher"/>
35 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
36 <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
37 <field name="partner_id" string="Customer"/>
38 <field name="journal_id" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/>
39 <field name="period_id"/>
40 <group expand="0" string="Group By...">
41 <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
42 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
43 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
44 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
50 <record id="act_pay_voucher" model="ir.actions.act_window">
51 <field name="name">Customer Payment</field>
52 <field name="res_model">account.voucher</field>
53 <field name="view_type">form</field>
54 <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field>
55 <field name="context">{'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field>
56 <field name="view_id" ref="view_vendor_receipt_form"/>
57 <field name="target">current</field>
60 <record model="ir.ui.view" id="view_sale_receipt_form">
61 <field name="name">account.voucher.sale.form</field>
62 <field name="model">account.voucher</field>
63 <field name="type">form</field>
64 <field name="arch" type="xml">
67 <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
68 <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)]}" class="oe_highlight"/>
69 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
70 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
71 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
72 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
74 <sheet string="Sales Receipt" >
75 <h1><label for="number" string="Sale Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
78 <field name="partner_id" domain="[('customer','=',True)]" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": true}'/>
79 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
82 <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)" groups="account.group_account_user"/>
83 <field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
85 <field name="paid" invisible="1"/>
86 <field name="currency_id" invisible="1"/>
88 <field name="type" invisible="True"/>
91 <page string="Sales Information">
92 <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}">
93 <tree string="Sales Lines" editable="bottom">
94 <field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection" groups="account.group_account_user"/>
96 <field name="amount" sum="Total"/>
97 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
101 <field name="narration" placeholder="Internal Notes" nolabel="1"/>
102 <group class="oe_subtotal_footer oe_right">
104 on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
105 widget="selection" nolabel="1"
106 placeholder="select tax..."
107 domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
108 <field name="tax_amount" nolabel="1"/>
109 <div class="oe_subtotal_footer_separator">
110 <label for="amount"/>
111 <button type="object" class="oe_link oe_edit_only"
112 name="compute_tax" string="(update)"
113 attrs="{'invisible': [('state','!=','draft')]}"/>
115 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
118 <field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
119 <field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
120 <field name="account_id"
121 attrs="{'invisible':[('pay_now','!=','pay_now')]}"
122 domain="[('type','=','liquidity')]"/>
123 <field name="reference"
124 attrs="{'invisible':[('pay_now','!=','pay_now')]}"/>
128 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
130 <field name="period_id"/>
131 <field name="audit"/>
133 <field name="move_ids" readonly="1">
134 <tree string="Journal Items">
135 <field name="move_id"/>
138 <field name="statement_id"/>
139 <field name="partner_id"/>
140 <field name="account_id"/>
142 <field name="debit"/>
143 <field name="credit"/>
144 <field name="state"/>
145 <field name="reconcile_id"/>
151 <div class="oe_chatter">
152 <field name="message_ids" widget="mail_thread"/>
158 <!-- Sales Voucher -->
159 <record id="action_sale_receipt" model="ir.actions.act_window">
160 <field name="name">Sales Receipt</field>
161 <field name="res_model">account.voucher</field>
162 <field name="view_type">form</field>
163 <field name="domain">[('journal_id.type','in',['sale','sale_refund']), ('type','=','sale')]</field>
164 <field name="context">{'default_type': 'sale', 'type': 'sale'}</field>
165 <field name="view_id" eval="False"/>
166 <field name="search_view_id" ref="view_voucher_filter_sale"/>
167 <field name="target">current</field>
168 <field name="help" type="xml">
170 Click to create a sale receipt.
172 When the sale receipt is confirmed, you can record the customer
173 payment related to this sales receipt.
177 <record id="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="action_sale_receipt"/>
182 <record id="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="view_sale_receipt_form"/>
186 <field name="act_window_id" ref="action_sale_receipt"/>
189 <menuitem id="menu_action_sale_receipt" icon="STOCK_JUSTIFY_FILL"
190 action="action_sale_receipt"
191 parent="account.menu_finance_receivables"
194 <!-- Purchase Vouchers -->
195 <record id="act_pay_bills" model="ir.actions.act_window">
196 <field name="name">Bill Payment</field>
197 <field name="res_model">account.voucher</field>
198 <field name="view_type">form</field>
199 <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field>
200 <field name="context">{'default_type':'payment', 'type':'payment', 'default_partner_id': partner_id, 'partner_id': partner_id, 'default_reference':reference}</field>
201 <field name="view_id" ref="view_vendor_payment_form"/>
202 <field name="target">current</field>
204 <record model="ir.ui.view" id="view_purchase_receipt_form">
205 <field name="name">account.voucher.purchase.form</field>
206 <field name="model">account.voucher</field>
207 <field name="type">form</field>
208 <field name="arch" type="xml">
211 <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
212 <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)]}" class="oe_highlight"/>
213 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
214 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
215 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
216 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
218 <sheet string="Supplier Voucher">
219 <h1><label for="number" string="Purchase Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
221 <field name="pay_now" invisible="1"/>
222 <field name="account_id" domain="[('type','=','other')]" invisible="True"/>
223 <field name="type" invisible="True"/>
226 <field name="partner_id" domain="[('supplier','=',True)]" 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}" />
227 <field name="name" colspan="2"/>
228 <field name="reference"/>
229 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
232 <field name="date" string="Bill Date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
233 <field name="date_due"/>
234 <field name="paid" invisible="1"/>
235 <field name="currency_id" invisible="1"/>
236 <field name="journal_id"
237 domain="[('type','in',['purchase','purchase_refund'])]"
239 on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"
240 groups="account.group_account_user"/>
244 <page string="Bill Information">
245 <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}">
246 <tree string="Expense Lines" editable="bottom">
247 <field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]" groups="account.group_account_user"/>
249 <field name="amount"/>
250 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
254 <field name="narration" placeholder="Internal Notes" nolabel="1"/>
255 <group class="oe_subtotal_footer oe_right">
258 <label for="tax_id" />
259 <button type="object"
260 icon="terp-stock_format-scientific"
262 attrs="{'invisible': [('state','!=','draft')]}"/>
266 on_change="onchange_price(line_dr_ids, tax_id, partner_id)"
267 widget="selection" nolabel="1"
268 placeholder="select tax..."
270 domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"
272 <field name="tax_amount" nolabel="1"/>
273 <div class="oe_subtotal_footer_separator">
274 <label for="amount"/>
275 <button type="object" class="oe_link oe_edit_only"
276 name="compute_tax" string="(update)"
277 attrs="{'invisible': [('state','!=','draft')]}"/>
279 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
283 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
285 <field name="period_id"/>
286 <field name="audit"/>
288 <field name="move_ids" readonly="1">
289 <tree string="Journal Items">
290 <field name="move_id"/>
293 <field name="statement_id"/>
294 <field name="partner_id"/>
295 <field name="account_id"/>
297 <field name="debit"/>
298 <field name="credit"/>
299 <field name="state"/>
300 <field name="reconcile_id"/>
306 <div class="oe_chatter">
307 <field name="message_ids" widget="mail_thread"/>
312 <record id="action_purchase_receipt" model="ir.actions.act_window">
313 <field name="name">Purchase Receipt</field>
314 <field name="res_model">account.voucher</field>
315 <field name="view_type">form</field>
316 <field name="domain">[('journal_id.type','in',['purchase','purchase_refund']), ('type','=','purchase')]</field>
317 <field name="context">{'default_type': 'purchase', 'type': 'purchase'}</field>
318 <field name="view_id" eval="False"/>
319 <field name="search_view_id" eval="view_voucher_filter_vendor"/>
320 <field name="target">current</field>
321 <field name="help" type="xml">
323 Click to register a purchase receipt.
325 When the purchase receipt is confirmed, you can record the
326 supplier payment related to this purchase receipt.
330 <record id="action_purchase_receipt_tree" model="ir.actions.act_window.view">
331 <field eval="1" name="sequence"/>
332 <field name="view_mode">tree</field>
333 <field name="act_window_id" ref="action_purchase_receipt"/>
335 <record id="action_purchase_receipt_form" model="ir.actions.act_window.view">
336 <field eval="2" name="sequence"/>
337 <field name="view_mode">form</field>
338 <field name="view_id" ref="view_purchase_receipt_form"/>
339 <field name="act_window_id" ref="action_purchase_receipt"/>
342 <menuitem id="menu_action_purchase_receipt" icon="STOCK_JUSTIFY_FILL"
343 action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="10"/>