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" class="oe_highlight"/>
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)]}" class="oe_highlight"/>
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" >
91 <h1><label for="number" string="Sale Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
94 <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}'/>
95 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
98 <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"/>
99 <field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
101 <field name="paid" invisible="1"/>
102 <field name="currency_id" invisible="1"/>
104 <field name="type" invisible="True"/>
107 <page string="Sales Information">
108 <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}">
109 <tree string="Sales Lines" editable="bottom">
110 <field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection" groups="account.group_account_user"/>
112 <field name="amount" sum="Total"/>
113 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
117 <field name="narration" placeholder="Internal Notes" nolabel="1"/>
118 <group class="oe_subtotal_footer oe_right">
120 on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
121 widget="selection" nolabel="1"
122 placeholder="select tax..."
123 domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
124 <field name="tax_amount" nolabel="1"/>
125 <div class="oe_subtotal_footer_separator">
126 <label for="amount"/>
127 <button type="object" class="oe_link oe_edit_only"
128 name="compute_tax" string="(update)"
129 attrs="{'invisible': [('state','!=','draft')]}"/>
131 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
134 <field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
135 <field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
136 <field name="account_id"
137 attrs="{'invisible':[('pay_now','!=','pay_now')]}"
138 domain="[('type','=','liquidity')]"/>
139 <field name="reference"
140 attrs="{'invisible':[('pay_now','!=','pay_now')]}"/>
144 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
146 <field name="period_id"/>
147 <field name="audit"/>
149 <field name="move_ids" readonly="1">
150 <tree string="Journal Items">
151 <field name="move_id"/>
154 <field name="statement_id"/>
155 <field name="partner_id"/>
156 <field name="account_id"/>
158 <field name="debit"/>
159 <field name="credit"/>
160 <field name="state"/>
161 <field name="reconcile_id"/>
167 <div class="oe_chatter">
168 <field name="message_ids" widget="mail_thread"/>
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>
185 Click here to create a sale receipt.
187 When the sales receipt is confirmed, you can record the customer payment related to this sales receipt.
190 <record id="action_sale_receipt_tree" model="ir.actions.act_window.view">
191 <field eval="1" name="sequence"/>
192 <field name="view_mode">tree</field>
193 <field name="act_window_id" ref="action_sale_receipt"/>
195 <record id="action_sale_receipt_form" model="ir.actions.act_window.view">
196 <field eval="2" name="sequence"/>
197 <field name="view_mode">form</field>
198 <field name="view_id" ref="view_sale_receipt_form"/>
199 <field name="act_window_id" ref="action_sale_receipt"/>
202 <menuitem id="menu_action_sale_receipt" icon="STOCK_JUSTIFY_FILL"
203 action="action_sale_receipt"
204 parent="account.menu_finance_receivables"
207 <!-- Purchase Vouchers -->
208 <record id="act_pay_bills" model="ir.actions.act_window">
209 <field name="name">Bill Payment</field>
210 <field name="res_model">account.voucher</field>
211 <field name="view_type">form</field>
212 <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field>
213 <field name="context">{'default_type':'payment', 'type':'payment', 'default_partner_id': partner_id, 'partner_id': partner_id, 'default_reference':reference}</field>
214 <field name="view_id" ref="view_vendor_payment_form"/>
215 <field name="target">current</field>
217 <record model="ir.ui.view" id="view_purchase_receipt_form">
218 <field name="name">account.voucher.purchase.form</field>
219 <field name="model">account.voucher</field>
220 <field name="type">form</field>
221 <field name="arch" type="xml">
224 <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
225 <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"/>
226 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
227 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
228 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
229 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
231 <sheet string="Supplier Voucher">
232 <h1><label for="number" string="Purchase Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
234 <field name="pay_now" invisible="1"/>
235 <field name="account_id" domain="[('type','=','other')]" invisible="True"/>
236 <field name="type" invisible="True"/>
239 <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}" />
240 <field name="name" colspan="2"/>
241 <field name="reference"/>
242 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
245 <field name="date" string="Bill Date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
246 <field name="date_due"/>
247 <field name="paid" invisible="1"/>
248 <field name="currency_id" invisible="1"/>
249 <field name="journal_id"
250 domain="[('type','in',['purchase','purchase_refund'])]"
252 on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"
253 groups="account.group_account_user"/>
257 <page string="Bill Information">
258 <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}">
259 <tree string="Expense Lines" editable="bottom">
260 <field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]" groups="account.group_account_user"/>
262 <field name="amount"/>
263 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
267 <field name="narration" placeholder="Internal Notes" nolabel="1"/>
268 <group class="oe_subtotal_footer oe_right">
271 <label for="tax_id" />
272 <button type="object"
273 icon="terp-stock_format-scientific"
275 attrs="{'invisible': [('state','!=','draft')]}"/>
279 on_change="onchange_price(line_dr_ids, tax_id, partner_id)"
280 widget="selection" nolabel="1"
281 placeholder="select tax..."
283 domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"
285 <field name="tax_amount" nolabel="1"/>
286 <div class="oe_subtotal_footer_separator">
287 <label for="amount"/>
288 <button type="object" class="oe_link oe_edit_only"
289 name="compute_tax" string="(update)"
290 attrs="{'invisible': [('state','!=','draft')]}"/>
292 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
296 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
298 <field name="period_id"/>
299 <field name="audit"/>
301 <field name="move_ids" readonly="1">
302 <tree string="Journal Items">
303 <field name="move_id"/>
306 <field name="statement_id"/>
307 <field name="partner_id"/>
308 <field name="account_id"/>
310 <field name="debit"/>
311 <field name="credit"/>
312 <field name="state"/>
313 <field name="reconcile_id"/>
319 <div class="oe_chatter">
320 <field name="message_ids" widget="mail_thread"/>
325 <record id="action_purchase_receipt" model="ir.actions.act_window">
326 <field name="name">Purchase Receipt</field>
327 <field name="res_model">account.voucher</field>
328 <field name="view_type">form</field>
329 <field name="domain">[('journal_id.type','in',['purchase','purchase_refund']), ('type','=','purchase')]</field>
330 <field name="context">{'default_type': 'purchase', 'type': 'purchase'}</field>
331 <field name="view_id" eval="False"/>
332 <field name="search_view_id" eval="view_voucher_filter_vendor"/>
333 <field name="target">current</field>
335 Click here to create a purchase receipt.
337 When the purchase receipt is confirmed, you can record the supplier payment related to this purchase receipt.
340 <record id="action_purchase_receipt_tree" model="ir.actions.act_window.view">
341 <field eval="1" name="sequence"/>
342 <field name="view_mode">tree</field>
343 <field name="act_window_id" ref="action_purchase_receipt"/>
345 <record id="action_purchase_receipt_form" model="ir.actions.act_window.view">
346 <field eval="2" name="sequence"/>
347 <field name="view_mode">form</field>
348 <field name="view_id" ref="view_purchase_receipt_form"/>
349 <field name="act_window_id" ref="action_purchase_receipt"/>
352 <menuitem id="menu_action_purchase_receipt" icon="STOCK_JUSTIFY_FILL"
353 action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="10"/>