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"/>
14 <field name="journal_id" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/>
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"/>
36 <field name="journal_id" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/>
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 Payment</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">{'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="Sale voucher" 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="Pay" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/>
66 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
67 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
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="Sale Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
75 <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}'/>
76 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
79 <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"/>
80 <field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
82 <field name="paid" invisible="1"/>
83 <field name="currency_id" invisible="1"/>
85 <field name="type" invisible="True"/>
88 <page string="Sales Information">
89 <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}">
90 <tree string="Sales Lines" editable="bottom">
91 <field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection" groups="account.group_account_user"/>
93 <field name="amount" sum="Total"/>
94 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
98 <field name="narration" placeholder="Internal Notes" nolabel="1"/>
99 <group class="oe_subtotal_footer oe_right">
101 on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
102 widget="selection" nolabel="1"
103 placeholder="Select tax..."
104 domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
105 <field name="tax_amount" nolabel="1"/>
106 <div class="oe_subtotal_footer_separator">
107 <label for="amount"/>
108 <button type="object" class="oe_link oe_edit_only"
109 name="compute_tax" string="(update)"
110 attrs="{'invisible': [('state','!=','draft')]}"/>
112 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
115 <field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
116 <field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
117 <field name="account_id"
118 attrs="{'invisible':[('pay_now','!=','pay_now')]}"
119 domain="[('type','=','liquidity')]"/>
120 <field name="reference"
121 attrs="{'invisible':[('pay_now','!=','pay_now')]}"/>
125 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
127 <field name="period_id"/>
128 <field name="audit"/>
130 <field name="move_ids" readonly="1">
131 <tree string="Journal Items">
132 <field name="move_id"/>
135 <field name="statement_id"/>
136 <field name="partner_id"/>
137 <field name="account_id"/>
139 <field name="debit"/>
140 <field name="credit"/>
141 <field name="state"/>
142 <field name="reconcile_id"/>
148 <div class="oe_chatter">
149 <field name="message_ids" widget="mail_thread"/>
150 <field name="message_follower_ids" widget="mail_followers"/>
156 <!-- Sales Voucher -->
157 <record id="action_sale_receipt" model="ir.actions.act_window">
158 <field name="name">Sales Receipt</field>
159 <field name="res_model">account.voucher</field>
160 <field name="view_type">form</field>
161 <field name="domain">[('journal_id.type','in',['sale','sale_refund']), ('type','=','sale')]</field>
162 <field name="context">{'default_type': 'sale', 'type': 'sale'}</field>
163 <field name="view_id" eval="False"/>
164 <field name="search_view_id" ref="view_voucher_filter_sale"/>
165 <field name="target">current</field>
166 <field name="help" type="html">
167 <p class="oe_view_nocontent_create">
168 Click to create a sale receipt.
170 When the sale receipt is confirmed, you can record the customer
171 payment related to this sales receipt.
175 <record id="action_sale_receipt_tree" model="ir.actions.act_window.view">
176 <field eval="1" name="sequence"/>
177 <field name="view_mode">tree</field>
178 <field name="act_window_id" ref="action_sale_receipt"/>
180 <record id="action_sale_receipt_form" model="ir.actions.act_window.view">
181 <field eval="2" name="sequence"/>
182 <field name="view_mode">form</field>
183 <field name="view_id" ref="view_sale_receipt_form"/>
184 <field name="act_window_id" ref="action_sale_receipt"/>
187 <menuitem id="menu_action_sale_receipt" icon="STOCK_JUSTIFY_FILL"
188 action="action_sale_receipt"
189 parent="account.menu_finance_receivables"
192 <!-- Purchase Vouchers -->
193 <record id="act_pay_bills" model="ir.actions.act_window">
194 <field name="name">Bill Payment</field>
195 <field name="res_model">account.voucher</field>
196 <field name="view_type">form</field>
197 <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field>
198 <field name="context">{'default_type':'payment', 'type':'payment', 'default_partner_id': partner_id, 'partner_id': partner_id, 'default_reference':reference}</field>
199 <field name="view_id" ref="view_vendor_payment_form"/>
200 <field name="target">current</field>
202 <record model="ir.ui.view" id="view_purchase_receipt_form">
203 <field name="name">account.voucher.purchase.form</field>
204 <field name="model">account.voucher</field>
205 <field name="arch" type="xml">
206 <form string="Purchase Voucher" version="7.0">
208 <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
209 <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"/>
210 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
211 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
212 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
213 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
215 <sheet string="Supplier Voucher">
216 <h1><label for="number" string="Purchase Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
218 <field name="pay_now" invisible="1"/>
219 <field name="account_id" domain="[('type','=','other')]" invisible="True"/>
220 <field name="type" invisible="True"/>
223 <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}" />
224 <field name="name" colspan="2"/>
225 <field name="reference"/>
226 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
229 <field name="date" string="Bill Date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
230 <field name="date_due"/>
231 <field name="paid" invisible="1"/>
232 <field name="currency_id" invisible="1"/>
233 <field name="journal_id"
234 domain="[('type','in',['purchase','purchase_refund'])]"
236 on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"
237 groups="account.group_account_user"/>
241 <page string="Bill Information">
242 <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}">
243 <tree string="Expense Lines" editable="bottom">
244 <field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]" groups="account.group_account_user"/>
246 <field name="amount"/>
247 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
251 <field name="narration" placeholder="Internal Notes" nolabel="1"/>
252 <group class="oe_subtotal_footer oe_right">
255 <label for="tax_id" />
256 <button type="object"
257 icon="terp-stock_format-scientific"
259 attrs="{'invisible': [('state','!=','draft')]}"/>
263 on_change="onchange_price(line_dr_ids, tax_id, partner_id)"
264 widget="selection" nolabel="1"
265 placeholder="Select tax..."
267 domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"
269 <field name="tax_amount" nolabel="1"/>
270 <div class="oe_subtotal_footer_separator">
271 <label for="amount"/>
272 <button type="object" class="oe_link oe_edit_only"
273 name="compute_tax" string="(update)"
274 attrs="{'invisible': [('state','!=','draft')]}"/>
276 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
280 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
282 <field name="period_id"/>
283 <field name="audit"/>
285 <field name="move_ids" readonly="1">
286 <tree string="Journal Items">
287 <field name="move_id"/>
290 <field name="statement_id"/>
291 <field name="partner_id"/>
292 <field name="account_id"/>
294 <field name="debit"/>
295 <field name="credit"/>
296 <field name="state"/>
297 <field name="reconcile_id"/>
303 <div class="oe_chatter">
304 <field name="message_ids" widget="mail_thread"/>
305 <field name="message_follower_ids" widget="mail_followers"/>
310 <record id="action_purchase_receipt" model="ir.actions.act_window">
311 <field name="name">Purchase Receipt</field>
312 <field name="res_model">account.voucher</field>
313 <field name="view_type">form</field>
314 <field name="domain">[('journal_id.type','in',['purchase','purchase_refund']), ('type','=','purchase')]</field>
315 <field name="context">{'default_type': 'purchase', 'type': 'purchase'}</field>
316 <field name="view_id" eval="False"/>
317 <field name="search_view_id" eval="view_voucher_filter_vendor"/>
318 <field name="target">current</field>
319 <field name="help" type="html">
320 <p class="oe_view_nocontent_create">
321 Click to register a purchase receipt.
323 When the purchase receipt is confirmed, you can record the
324 supplier payment related to this purchase receipt.
328 <record id="action_purchase_receipt_tree" model="ir.actions.act_window.view">
329 <field eval="1" name="sequence"/>
330 <field name="view_mode">tree</field>
331 <field name="act_window_id" ref="action_purchase_receipt"/>
333 <record id="action_purchase_receipt_form" model="ir.actions.act_window.view">
334 <field eval="2" name="sequence"/>
335 <field name="view_mode">form</field>
336 <field name="view_id" ref="view_purchase_receipt_form"/>
337 <field name="act_window_id" ref="action_purchase_receipt"/>
340 <menuitem id="menu_action_purchase_receipt" icon="STOCK_JUSTIFY_FILL"
341 action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="10"/>