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="arch" type="xml">
8 <search string="Search Vouchers">
9 <field name="number" string="Voucher"/>
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 <field name="partner_id" string="Supplier" filter_domain="[('partner_id','child_of',self)]"/>
14 <field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
15 <field name="period_id"/>
16 <group expand="0" string="Group By...">
17 <filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
18 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
19 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
20 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
26 <record id="view_voucher_filter_sale" model="ir.ui.view">
27 <field name="name">account.voucher.sale.select</field>
28 <field name="model">account.voucher</field>
29 <field name="arch" type="xml">
30 <search string="Search Vouchers">
31 <field name="number" string="Voucher"/>
33 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
34 <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
35 <field name="partner_id" string="Customer" filter_domain="[('partner_id','child_of',self)]"/>
36 <field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
37 <field name="period_id"/>
38 <group expand="0" string="Group By...">
39 <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
40 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
41 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
42 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
48 <record id="act_pay_voucher" model="ir.actions.act_window">
49 <field name="name">Customer Payments</field>
50 <field name="res_model">account.voucher</field>
51 <field name="view_type">form</field>
52 <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field>
53 <field name="context">{'default_type':'receipt', 'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field>
54 <field name="view_id" ref="view_vendor_receipt_form"/>
55 <field name="target">current</field>
58 <record model="ir.ui.view" id="view_sale_receipt_form">
59 <field name="name">account.voucher.sale.form</field>
60 <field name="model">account.voucher</field>
61 <field name="arch" type="xml">
62 <form string="Sales Receipt" version="7.0">
64 <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
65 <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="Validate Payment" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/>
66 <button name="cancel_voucher" string="Cancel Receipt" states="draft,proforma" />
67 <button name="cancel_voucher" string="Cancel Receipt" type="object" states="posted" confirm="Are you sure you want to cancel this receipt?"/>
68 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
69 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
71 <sheet string="Sales Receipt" >
72 <h1><label for="number" string="Sales Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
75 <field name="type" invisible="True"/>
76 <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}'/>
77 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
80 <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"/>
81 <field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
83 <field name="paid" invisible="1"/>
84 <field name="paid_amount_in_company_currency" invisible="1"/>
85 <field name="currency_id" invisible="1"/>
89 <page string="Sales Information">
90 <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}">
91 <tree string="Sales Lines" editable="bottom">
92 <field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection"/>
94 <field name="amount" sum="Total"/>
95 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
99 <field name="narration" placeholder="Internal Notes" nolabel="1"/>
100 <group class="oe_subtotal_footer oe_right">
102 on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
103 widget="selection" nolabel="1"
105 domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
106 <field name="tax_amount" nolabel="1"/>
107 <div class="oe_subtotal_footer_separator">
108 <label for="amount"/>
109 <button type="object" class="oe_link oe_edit_only"
110 name="compute_tax" string="(update)"
111 attrs="{'invisible': [('state','!=','draft')]}"/>
113 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
116 <field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
117 <field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
118 <field name="account_id"
119 attrs="{'invisible':[('pay_now','!=','pay_now')]}"
120 domain="[('type','=','liquidity')]"/>
121 <field name="reference"
122 attrs="{'invisible':[('pay_now','!=','pay_now')]}"/>
126 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
128 <field name="period_id"/>
129 <field name="audit"/>
131 <field name="move_ids" readonly="1">
132 <tree string="Journal Items">
133 <field name="move_id"/>
136 <field name="statement_id"/>
137 <field name="partner_id"/>
138 <field name="account_id"/>
140 <field name="debit"/>
141 <field name="credit"/>
142 <field name="state"/>
143 <field name="reconcile_id"/>
148 <group col="4" invisible="1">
149 <field name="is_multi_currency" invisible="1"/>
150 <field name="currency_help_label" invisible="1"/>
151 <field name="payment_rate" invisible="1"/>
152 <field name="payment_rate_currency_id" invisible="1"/>
153 <field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
156 <div class="oe_chatter">
157 <field name="message_follower_ids" widget="mail_followers"/>
158 <field name="message_ids" widget="mail_thread"/>
164 <!-- Sales Voucher -->
165 <record id="action_sale_receipt" model="ir.actions.act_window">
166 <field name="name">Sales Receipts</field>
167 <field name="res_model">account.voucher</field>
168 <field name="view_type">form</field>
169 <field name="domain">[('journal_id.type','in',['sale','sale_refund']), ('type','=','sale')]</field>
170 <field name="context">{'default_type': 'sale', 'type': 'sale'}</field>
171 <field name="view_id" eval="False"/>
172 <field name="search_view_id" ref="view_voucher_filter_sale"/>
173 <field name="target">current</field>
174 <field name="help" type="html">
175 <p class="oe_view_nocontent_create">
176 Click to create a sale receipt.
178 When the sale receipt is confirmed, you can record the customer
179 payment related to this sales receipt.
183 <record id="action_sale_receipt_tree" model="ir.actions.act_window.view">
184 <field eval="1" name="sequence"/>
185 <field name="view_mode">tree</field>
186 <field name="act_window_id" ref="action_sale_receipt"/>
188 <record id="action_sale_receipt_form" model="ir.actions.act_window.view">
189 <field eval="2" name="sequence"/>
190 <field name="view_mode">form</field>
191 <field name="view_id" ref="view_sale_receipt_form"/>
192 <field name="act_window_id" ref="action_sale_receipt"/>
195 <menuitem id="menu_action_sale_receipt" icon="STOCK_JUSTIFY_FILL"
196 action="action_sale_receipt"
197 parent="account.menu_finance_receivables"
200 <!-- Purchase Vouchers -->
201 <record id="act_pay_bills" model="ir.actions.act_window">
202 <field name="name">Bill Payment</field>
203 <field name="res_model">account.voucher</field>
204 <field name="view_type">form</field>
205 <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field>
206 <field name="context">{'default_type':'payment', 'type':'payment', 'default_partner_id': partner_id, 'partner_id': partner_id, 'default_reference':reference}</field>
207 <field name="view_id" ref="view_vendor_payment_form"/>
208 <field name="target">current</field>
210 <record model="ir.ui.view" id="view_purchase_receipt_form">
211 <field name="name">account.voucher.purchase.form</field>
212 <field name="model">account.voucher</field>
213 <field name="arch" type="xml">
214 <form string="Purchase Voucher" version="7.0">
216 <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
217 <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"/>
218 <button name="cancel_voucher" string="Cancel Voucher" states="draft,proforma" />
219 <button name="cancel_voucher" string="Cancel Voucher" type="object" states="posted" confirm="Are you sure you want to cancel this receipt?"/>
220 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
221 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
223 <sheet string="Supplier Voucher">
224 <h1><label for="number" string="Purchase Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
226 <field name="pay_now" invisible="1"/>
227 <field name="account_id" domain="[('type','=','other')]" invisible="True"/>
228 <field name="type" invisible="True"/>
231 <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}" />
232 <field name="name" colspan="2"/>
233 <field name="reference"/>
234 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
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="paid" invisible="1"/>
240 <field name="currency_id" invisible="1"/>
241 <field name="journal_id"
242 domain="[('type','in',['purchase','purchase_refund'])]"
244 on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"
245 groups="account.group_account_user"/>
246 <field name="paid_amount_in_company_currency" invisible="1"/>
247 <field name="currency_help_label" invisible="1"/>
251 <page string="Bill Information">
252 <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}">
253 <tree string="Expense Lines" editable="bottom">
254 <field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]"/>
256 <field name="amount"/>
257 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
261 <field name="narration" placeholder="Internal Notes" nolabel="1"/>
262 <group class="oe_subtotal_footer oe_right">
265 <label for="tax_id" />
266 <button type="object"
267 icon="terp-stock_format-scientific"
269 attrs="{'invisible': [('state','!=','draft')]}"/>
273 on_change="onchange_price(line_dr_ids, tax_id, partner_id)"
274 widget="selection" nolabel="1"
277 domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"
279 <field name="tax_amount" nolabel="1"/>
280 <div class="oe_subtotal_footer_separator">
281 <label for="amount"/>
282 <button type="object" class="oe_link oe_edit_only"
283 name="compute_tax" string="(update)"
284 attrs="{'invisible': [('state','!=','draft')]}"/>
286 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
290 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
292 <field name="period_id"/>
293 <field name="audit"/>
295 <field name="move_ids" readonly="1">
296 <tree string="Journal Items">
297 <field name="move_id"/>
300 <field name="statement_id"/>
301 <field name="partner_id"/>
302 <field name="account_id"/>
304 <field name="debit"/>
305 <field name="credit"/>
306 <field name="state"/>
307 <field name="reconcile_id"/>
313 <div class="oe_chatter">
314 <field name="message_follower_ids" widget="mail_followers"/>
315 <field name="message_ids" widget="mail_thread"/>
320 <record id="action_purchase_receipt" model="ir.actions.act_window">
321 <field name="name">Purchase Receipts</field>
322 <field name="res_model">account.voucher</field>
323 <field name="view_type">form</field>
324 <field name="domain">[('journal_id.type','in',['purchase','purchase_refund']), ('type','=','purchase')]</field>
325 <field name="context">{'default_type': 'purchase', 'type': 'purchase'}</field>
326 <field name="view_id" eval="False"/>
327 <field name="search_view_id" eval="view_voucher_filter_vendor"/>
328 <field name="target">current</field>
329 <field name="help" type="html">
330 <p class="oe_view_nocontent_create">
331 Click to register a purchase receipt.
333 When the purchase receipt is confirmed, you can record the
334 supplier payment related to this purchase receipt.
338 <record id="action_purchase_receipt_tree" model="ir.actions.act_window.view">
339 <field eval="1" name="sequence"/>
340 <field name="view_mode">tree</field>
341 <field name="act_window_id" ref="action_purchase_receipt"/>
343 <record id="action_purchase_receipt_form" model="ir.actions.act_window.view">
344 <field eval="2" name="sequence"/>
345 <field name="view_mode">form</field>
346 <field name="view_id" ref="view_purchase_receipt_form"/>
347 <field name="act_window_id" ref="action_purchase_receipt"/>
350 <menuitem id="menu_action_purchase_receipt" icon="STOCK_JUSTIFY_FILL"
351 action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="10"/>