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="arch" type="xml">
8 <tree colors="blue:state == 'draft';gray:state == 'cancel';red:audit" string="Voucher Entries">
10 <field name="number"/>
11 <field name="reference"/>
12 <field name="partner_id"/>
13 <field name="journal_id" groups="account.group_account_user"/>
14 <field name="period_id" invisible="context.get('visible', True)"/>
15 <field name="type" invisible="context.get('visible', True)"/>
16 <field name="amount" sum="Total Amount"/>
17 <field name="audit" invisible="1"/>
22 <record model="ir.ui.view" id="view_voucher_line_form">
23 <field name="name">account.voucher.line.form</field>
24 <field name="model">account.voucher.line</field>
25 <field name="arch" type="xml">
26 <form string="Voucher Lines" version="7.0">
29 <field name="account_id"/>
30 <field name="partner_id"/>
31 <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="arch" type="xml">
41 <form string="Accounting Voucher" version="7.0">
43 <button name="proforma_voucher" string="Post" states="draft" class="oe_highlight"/>
44 <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to unreconcile this record?"/>
45 <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
46 <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
47 <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
49 <sheet string="Accounting Voucher">
50 <group col="4" colspan="4">
51 <field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
52 <field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/>
53 <field name="journal_id" widget="selection" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
54 <field name="type" required="1"/>
55 <field name="name" colspan="2"/>
56 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
57 <field name="reference"/>
58 <field name="number"/>
59 <field name="currency_id" groups="base.group_multi_currency"/>
60 <field name="account_id" widget="selection" invisible="True"/>
61 <field name="payment_rate_currency_id" invisible="1"/>
63 <notebook colspan="4">
64 <page string="Voucher Entry">
65 <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}">
66 <tree string="Voucher Items" editable="bottom">
67 <field name="account_id"/>
69 <field name="amount" sum="Total Amount"/>
71 <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
75 <field name="narration" nolabel="1" placeholder="Internal Notes"/>
76 <group class="oe_subtotal_footer oe_right" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
77 <field name="tax_id" on_change="onchange_price(line_ids, tax_id, partner_id)" widget="selection" nolabel="1"/>
78 <field name="tax_amount" nolabel="1"/>
79 <div class="oe_subtotal_footer_separator">
81 <button type="object" icon="terp-stock_format-scientific" name="compute_tax" class="oe_link oe_edit_only" string="(Update)" attrs="{'invisible': [('state','!=','draft')]}"/>
83 <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
87 <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
89 <field name="period_id"/>
92 <field name="move_ids" readonly="1">
93 <tree string="Journal Items">
94 <field name="move_id"/>
97 <field name="statement_id"/>
98 <field name="partner_id"/>
99 <field name="account_id"/>
101 <field name="debit"/>
102 <field name="credit"/>
103 <field name="state"/>
104 <field name="reconcile_id"/>
110 <div class="oe_chatter">
111 <field name="message_is_follower" invisible="1"/>
112 <field name="message_ids" widget="mail_thread"/>
113 <!-- Invisible fields used in chatter widgets -->
114 <field name="message_subtype_data" invisible="True"/>
115 <field name="message_is_follower" invisible="True"/>
116 <field name="message_follower_ids" widget="mail_followers"/>
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="priority">1</field>
126 <field name="arch" type="xml">
127 <search string="Search Vouchers">
128 <field name="number" string="Voucher"/>
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"/>
133 <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('state','=','posted'), ('audit','=',False)]" help="To Review"/>
134 <field name="partner_id"/>
135 <field name="journal_id" context="{'journal_id': self, 'set_visible':False}" />
136 <field name="period_id"/>
137 <group expand="0" string="Group By...">
138 <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
139 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
140 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
141 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
147 <record id="account_cash_statement_graph" model="ir.ui.view">
148 <field name="name">account.voucher.graph</field>
149 <field name="model">account.voucher</field>
150 <field name="arch" type="xml">
151 <graph string="Voucher Statistics" type="bar">
153 <field name="amount" operator="+"/>
158 <!-- Journal Vouchers -->
159 <record model="ir.actions.act_window" id="action_voucher_list">
160 <field name="name">Journal Vouchers</field>
161 <field name="res_model">account.voucher</field>
162 <field name="view_type">form</field>
163 <field name="view_mode">tree,form,graph</field>
164 <field name="context">{'type':'general'}</field>
165 <field name="view_id" eval="view_voucher_tree"/>
166 <field name="search_view_id" ref="view_voucher_filter"/>
168 <record id="action_journal_voucher_tree" model="ir.actions.act_window.view">
169 <field eval="1" name="sequence"/>
170 <field name="view_mode">tree</field>
171 <field name="act_window_id" ref="action_voucher_list"/>
173 <record id="action_journal_voucher_form" model="ir.actions.act_window.view">
174 <field eval="2" name="sequence"/>
175 <field name="view_mode">form</field>
176 <field name="view_id" ref="view_voucher_form"/>
177 <field name="act_window_id" ref="action_voucher_list"/>
179 <menuitem action="action_voucher_list" id="menu_encode_entries_by_voucher" parent="account.menu_finance_entries" sequence="6"/>
182 id="act_journal_voucher_open"
183 name="Voucher Entries"
184 context="{'search_default_journal_id': active_id, 'type':type, 'default_journal_id': active_id}"
185 res_model="account.voucher"
186 src_model="account.journal"/>
188 <record model="ir.actions.act_window" id="action_review_voucher_list">
189 <field name="name">Vouchers Entries</field>
190 <field name="res_model">account.voucher</field>
191 <field name="view_type">form</field>
192 <field name="view_mode">tree,form</field>
193 <field name="view_id" eval="view_voucher_tree"/>
194 <field name="domain">[('state','=','posted')]</field>
195 <field name="context">{'state':'posted'}</field>
196 <field name="search_view_id" ref="view_voucher_filter"/>
199 <record id="view_bank_statement_form_invoice" model="ir.ui.view">
200 <field name="name">account.bank.statement.invoice.form.inherit</field>
201 <field name="model">account.bank.statement</field>
202 <field name="inherit_id" ref="account.view_bank_statement_form"/>
203 <field name="arch" type="xml">
204 <xpath expr="//div[@name='import_buttons']" position="inside">
205 <button name="%(action_view_account_statement_from_invoice_lines)d"
206 string="Import Invoices" type="action" icon="gtk-execute"
207 attrs="{'invisible':[('state','=','confirm')]}"/>
212 <record id="view_bank_statement_tree_voucher" model="ir.ui.view">
213 <field name="name">account.bank.statement.voucher.tree.inherit</field>
214 <field name="model">account.bank.statement</field>
215 <field name="inherit_id" ref="account.view_bank_statement_form"/>
216 <field name="arch" type="xml">
217 <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
218 <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}"/>
223 <record id="view_bank_statement_form_voucher" model="ir.ui.view">
224 <field name="name">account.bank.statement.voucher.form.inherit</field>
225 <field name="model">account.bank.statement</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']/form/group/field[@name='sequence']" position="before">
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}"/>
233 <record id="view_cash_statement_tree_voucher" model="ir.ui.view">
234 <field name="name">account.cash.statement.voucher.tree.inherit</field>
235 <field name="model">account.bank.statement</field>
236 <field name="inherit_id" ref="account.view_bank_statement_form2"/>
237 <field name="arch" type="xml">
238 <xpath expr="//page/field[@name='line_ids']/tree/field[@name='amount']" position="after">
239 <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}"/>
244 <record id="view_cash_statement_form_voucher" model="ir.ui.view">
245 <field name="name">account.cash.statement.voucher.form.inherit</field>
246 <field name="model">account.bank.statement</field>
247 <field name="inherit_id" ref="account.view_bank_statement_form2"/>
248 <field name="arch" type="xml">
249 <xpath expr="//page/field[@name='line_ids']/form/group/field[@name='amount']" position="after">
250 <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}"/>
255 <!-- res.company form view -->
256 <record model="ir.ui.view" id="view_company_inherit_currency_xchange_form">
257 <field name="name">res.company.form.inherit</field>
258 <field name="inherit_id" ref="base.view_company_form"/>
259 <field name="model">res.company</field>
260 <field name="arch" type="xml">
261 <field name="currency_id" position="after">
262 <field name="income_currency_exchange_account_id"/>
263 <field name="expense_currency_exchange_account_id"/>
271 <!-- After installation of the module, open the related menu -->
272 <record id="action_client_invoice_menu" model="ir.actions.client">
273 <field name="name">Open Invoicing Menu</field>
274 <field name="tag">reload</field>
275 <field name="params" eval="{'menu_id': ref('account.menu_finance')}"/>
277 <record id="base.open_menu" model="ir.actions.todo">
278 <field name="action_id" ref="action_client_invoice_menu"/>
279 <field name="state">open</field>