1 <?xml version="1.0" encoding="UTF-8"?>
4 <record model="ir.ui.view" id="view_voucher_tree">
5 <field name="name">account.voucher.tree</field>
6 <field name="model">account.voucher</field>
7 <field name="type">tree</field>
8 <field name="arch" type="xml">
9 <tree colors="blue:state == 'draft';gray:state == 'cancel';red:audit" string="Voucher Entries">
11 <field name="number"/>
12 <field name="reference"/>
13 <field name="partner_id"/>
14 <field name="journal_id"/>
15 <field name="period_id" invisible="context.get('visible', True)"/>
16 <field name="type" invisible="context.get('visible', True)"/>
17 <field name="amount" sum="Total Amount"/>
23 <record model="ir.ui.view" id="view_voucher_line_form">
24 <field name="name">account.voucher.line.form</field>
25 <field name="model">account.voucher.line</field>
26 <field name="type">form</field>
27 <field name="arch" type="xml">
28 <form string="Voucher Lines">
30 <field name="account_id"/>
31 <field name="partner_id"/>
32 <field name="amount"/>
37 <record model="ir.ui.view" id="view_voucher_form">
38 <field name="name">account.voucher.form</field>
39 <field name="model">account.voucher</field>
40 <field name="type">form</field>
41 <field name="arch" type="xml">
42 <form layout="manual">
43 <div class="oe_form_topbar">
44 <button name="proforma_voucher" string="Post" states="draft"/>
45 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to unreconcile this record?"/>
46 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
47 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
48 <div class="oe_right">
49 <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
51 <div class="oe_clear"/>
53 <sheet string="Accounting Voucher" layout="auto">
54 <group col="6" colspan="4" class="oe_form_header">
55 <field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
56 <field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/>
57 <field name="journal_id" widget="selection" select="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
58 <field name="type" required="1"/>
59 <field name="name" colspan="2"/>
60 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
61 <field name="reference" select="1"/>
62 <field name="account_id" widget="selection" invisible="True"/>
64 <notebook colspan="4">
65 <page string="Voucher Entry">
66 <field name="line_ids" on_change="onchange_price(line_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
67 <tree string="Voucher Items" editable="bottom">
68 <field name="account_id"/>
70 <field name="amount" sum="Total Amount"/>
72 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
75 <group col="2" colspan="3">
76 <separator string="Internal Notes" colspan="2"/>
77 <field name="narration" colspan="2" nolabel="1"/>
79 <group col="2" colspan="1">
80 <group col="2" colspan="1" >
81 <separator string="Other Information" colspan="2"/>
82 <field name="number"/>
83 <field name="currency_id"/>
85 <group col="4" colspan="1" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
86 <separator string="Total" colspan="4"/>
87 <field name="tax_id" on_change="onchange_price(line_ids, tax_id, partner_id)" widget="selection"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
88 <label colspan="1" string=""/><field name="amount" string="Total"/>
92 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
93 <group col="6" colspan="4">
94 <field name="period_id"/>
97 <field name="move_ids" colspan="4" nolabel="1" readonly="1">
98 <tree string="Journal Items">
99 <field name="move_id"/>
102 <field name="statement_id"/>
103 <field name="partner_id"/>
104 <field name="account_id"/>
106 <field name="debit"/>
107 <field name="credit"/>
108 <field name="state"/>
109 <field name="reconcile_id"/>
115 <div class="oe_form_sheet_width">
116 <field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
122 <record id="view_voucher_filter" model="ir.ui.view">
123 <field name="name">account.voucher.select</field>
124 <field name="model">account.voucher</field>
125 <field name="type">search</field>
126 <field name="priority">1</field>
127 <field name="arch" type="xml">
128 <search string="Search Vouchers">
130 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
131 <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
132 <separator orientation="vertical"/>
133 <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('state','=','posted'), ('audit','=',False)]" help="To Review"/>
134 <separator orientation="vertical"/>
136 <field name="number"/>
137 <field name="partner_id"/>
141 <field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" />
142 <field name="period_id"/>
145 <group expand="0" string="Group By...">
146 <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
147 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
148 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
149 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
155 <record id="account_cash_statement_graph" model="ir.ui.view">
156 <field name="name">account.voucher.graph</field>
157 <field name="model">account.voucher</field>
158 <field name="type">graph</field>
159 <field name="arch" type="xml">
160 <graph string="Voucher Statistics" type="bar">
162 <field name="amount" operator="+"/>
167 <!-- Journal Vouchers -->
168 <record model="ir.actions.act_window" id="action_voucher_list">
169 <field name="name">Journal Vouchers</field>
170 <field name="res_model">account.voucher</field>
171 <field name="view_type">form</field>
172 <field name="view_mode">tree,form,graph</field>
173 <field name="context">{'type':'general'}</field>
174 <field name="view_id" eval="view_voucher_tree"/>
175 <field name="search_view_id" ref="view_voucher_filter"/>
177 <record id="action_journal_voucher_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_voucher_list"/>
182 <record id="action_journal_voucher_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_voucher_form"/>
186 <field name="act_window_id" ref="action_voucher_list"/>
188 <menuitem action="action_voucher_list" id="menu_encode_entries_by_voucher" parent="account.menu_finance_entries" sequence="6"/>
191 id="act_journal_voucher_open"
192 name="Voucher Entries"
193 context="{'search_default_journal_id': active_id, 'type':type, 'default_journal_id': active_id}"
194 res_model="account.voucher"
195 src_model="account.journal"/>
197 <record model="ir.actions.act_window" id="action_review_voucher_list">
198 <field name="name">Vouchers Entries</field>
199 <field name="res_model">account.voucher</field>
200 <field name="view_type">form</field>
201 <field name="view_mode">tree,form</field>
202 <field name="view_id" eval="view_voucher_tree"/>
203 <field name="domain">[('state','=','posted')]</field>
204 <field name="context">{'state':'posted'}</field>
205 <field name="search_view_id" ref="view_voucher_filter"/>
208 <record id="view_bank_statement_form_invoice" model="ir.ui.view">
209 <field name="name">account.bank.statement.invoice.form.inherit</field>
210 <field name="model">account.bank.statement</field>
211 <field name="type">form</field>
212 <field name="inherit_id" ref="account.view_bank_statement_form"/>
213 <field name="arch" type="xml">
214 <field name="currency" invisible="1" position="after">
215 <button name="%(action_view_account_statement_from_invoice_lines)d"
216 string="Import Invoices" type="action" icon="gtk-execute"
217 attrs="{'invisible':[('state','=','confirm')]}"/>
222 <record id="view_bank_statement_tree_voucher" model="ir.ui.view">
223 <field name="name">account.bank.statement.voucher.tree.inherit</field>
224 <field name="model">account.bank.statement</field>
225 <field name="type">form</field>
226 <field name="inherit_id" ref="account.view_bank_statement_form"/>
227 <field name="arch" type="xml">
228 <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
229 <field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
234 <record id="view_bank_statement_form_voucher" model="ir.ui.view">
235 <field name="name">account.bank.statement.voucher.form.inherit</field>
236 <field name="model">account.bank.statement</field>
237 <field name="type">form</field>
238 <field name="inherit_id" ref="account.view_bank_statement_form"/>
239 <field name="arch" type="xml">
240 <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='sequence']" position="before">
241 <field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
245 <record id="view_cash_statement_tree_voucher" model="ir.ui.view">
246 <field name="name">account.cash.statement.voucher.tree.inherit</field>
247 <field name="model">account.bank.statement</field>
248 <field name="type">form</field>
249 <field name="inherit_id" ref="account.view_bank_statement_form2"/>
250 <field name="arch" type="xml">
251 <xpath expr="//page/field[@name='line_ids']/tree/field[@name='amount']" position="after">
252 <field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
257 <record id="view_cash_statement_form_voucher" model="ir.ui.view">
258 <field name="name">account.cash.statement.voucher.form.inherit</field>
259 <field name="model">account.bank.statement</field>
260 <field name="type">form</field>
261 <field name="inherit_id" ref="account.view_bank_statement_form2"/>
262 <field name="arch" type="xml">
263 <xpath expr="//page/field[@name='line_ids']/form/field[@name='amount']" position="after">
264 <field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
269 <!-- res.company form view -->
270 <record model="ir.ui.view" id="view_company_inherit_currency_xchange_form">
271 <field name="name">res.company.form.inherit</field>
272 <field name="inherit_id" ref="base.view_company_form"/>
273 <field name="model">res.company</field>
274 <field name="type">form</field>
275 <field name="arch" type="xml">
276 <field name="currency_id" position="after">
277 <field name="income_currency_exchange_account_id" colspan="2"/>
278 <field name="expense_currency_exchange_account_id" colspan="2"/>