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 string="Accounting Vouchers">
11 <field name="number"/>
13 <field name="journal_id"/>
14 <field name="type" invisible=" not context.get('set_visible',True)"/>
15 <field name="account_id" />
16 <field name="amount" sum="Total Amount"/>
17 <field name="period_id"/>
23 <record model="ir.ui.view" id="view_voucher_form">
24 <field name="name">account.voucher.form</field>
25 <field name="model">account.voucher</field>
26 <field name="type">form</field>
27 <field name="arch" type="xml">
28 <form string="Accounting Voucher">
29 <group col="6" colspan="4">
30 <field name="name" colspan="4"/>
31 <field name="number"/>
32 <field name="journal_id" select="1" on_change="onchange_journal(journal_id,type)"/>
33 <field name="account_id" on_change="onchange_account(account_id)"/>
34 <field name="type" on_change="onchange_journal(journal_id,type)"/>
36 <notebook colspan="4">
37 <page string="Journal Entries">
38 <field name="payment_ids" colspan="4" nolabel="1" height="250">
39 <tree string="Voucher Lines" editable="top">
40 <field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
41 <field name="account_id"/>
44 <field name="amount"/>
45 <field name="account_analytic_id"/>
49 <separator string="Narration" colspan="4"/>
50 <field name="narration" colspan="4" nolabel="1" height="50"/>
52 <page string="Other Info">
53 <field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
54 <field name="currency_id" select="1" />
55 <field name="period_id"/>
56 <field name="date" select="1"/>
57 <separator string="General Entries" colspan="4"/>
58 <field name="move_ids" colspan="4" nolabel="1" readonly="1"/>
61 <group col="10" colspan="4">
63 <button name="open_voucher" string="Pro-forma" states="draft" icon="terp-check"/>
64 <button name="proforma_voucher" string="Create" states="proforma" icon="terp-document-new"/>
65 <button name="recheck_voucher" string="Validate" states="recheck" icon="terp-check"/>
66 <button name="audit_complete" string="Audit Pass" states="posted" icon="terp-check"/>
67 <button name="cancel_voucher" string="Cancel" states="proforma,recheck,posted" icon="gtk-cancel"/>
68 <button name="cancel_to_draft" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
74 <record id="view_voucher_filter" model="ir.ui.view">
75 <field name="name">account.voucher.select</field>
76 <field name="model">account.voucher</field>
77 <field name="type">search</field>
78 <field name="arch" type="xml">
79 <search string="Search Vouchers">
80 <group col='8' colspan='4'>
81 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
82 <filter icon="terp-check" string="Proforma" domain="[('state','=','proforma')]" help="Proforma Vouchers"/>
83 <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
84 <filter icon="terp-gtk-stop" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers"/>
85 <separator orientation="vertical"/>
86 <field name="date" select='1'/>
87 <field name="name" select='1'/>
88 <field name="number" select='1'/>
89 <field name="partner_id" select='1'/>
92 <group expand="0" string="Group By..." colspan="12" col="10">
93 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
94 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
95 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
96 <filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
99 <group expand="0" string="Extended options...">
100 <field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" />
101 <field name="period_id" widget="selection" context="{'period_id': self}" groups="base.group_extended"/>
102 <field name="type" context="{'type': self}" />
107 <record id="view_voucher_filter_new" model="ir.ui.view">
108 <field name="name">account.voucher.select</field>
109 <field name="model">account.voucher</field>
110 <field name="type">search</field>
111 <field name="arch" type="xml">
112 <search string="Search Vouchers">
113 <group col='8' colspan='4'>
114 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
115 <filter icon="terp-check" string="Proforma" domain="[('state','=','proforma')]" help="Proforma Vouchers"/>
116 <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
117 <filter icon="terp-gtk-stop" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers"/>
118 <separator orientation="vertical"/>
119 <field name="date" select='1'/>
120 <field name="name" select='1'/>
121 <field name="number" select='1'/>
122 <field name="partner_id" select='1'/>
125 <group expand="0" string="Group By..." colspan="12" col="10">
126 <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
127 <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
128 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
129 <filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
135 <!-- Receipt Vouchers -->
136 <record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
137 <field name="name">Receivable Vouchers</field>
138 <field name="res_model">account.voucher</field>
139 <field name="view_type">form</field>
140 <field name="view_mode">tree,form</field>
141 <field name="view_id" eval="view_voucher_tree"/>
142 <field name="domain">[('journal_id.type','=','sale')]</field>
143 <field name="context">{'type':'sale'}</field>
144 <field name="search_view_id" ref="view_voucher_filter_new"/>
146 <menuitem id="menu_action_receipt_vou_voucher_list"
147 action="action_receipt_vou_voucher_list" parent="account.menu_finance_receivables" sequence="12"/>
149 <!-- Purchase Vouchers -->
150 <record model="ir.actions.act_window" id="action_pay_vou_voucher_list">
151 <field name="name">Payable Vouchers</field>
152 <field name="res_model">account.voucher</field>
153 <field name="view_type">form</field>
154 <field name="view_mode">tree,form</field>
155 <field name="view_id" eval="view_voucher_tree"/>
156 <field name="domain">[('journal_id.type','=','purchase')]</field>
157 <field name="context">{'type':'purchase'}</field>
158 <field name="search_view_id" ref="view_voucher_filter_new"/>
160 <menuitem id="menu_action_pay_vou_voucher_list"
161 action="action_pay_vou_voucher_list" parent="account.menu_finance_payables" sequence="12"/>
163 <!-- Journal Vouchers -->
164 <record model="ir.actions.act_window" id="action_voucher_list">
165 <field name="name">Journal Vouchers</field>
166 <field name="res_model">account.voucher</field>
167 <field name="view_type">form</field>
168 <field name="view_mode">tree,form</field>
169 <field name="context">{'type':'general'}</field>
170 <field name="view_id" eval="view_voucher_tree"/>
171 <field name="search_view_id" ref="view_voucher_filter"/>
173 <menuitem action="action_voucher_list" id="menu_encode_entries_by_voucher" parent="account.menu_finance_entries" sequence="6"/>
175 <record id="action_cheque_register" model="ir.actions.act_window">
176 <field name="name">Cheque Register</field>
177 <field name="type">ir.actions.act_window</field>
178 <field name="res_model">account.voucher</field>
179 <field name="view_type">form</field>
180 <field name="view_mode">tree,form</field>
181 <field name="domain">[('journal_id.type', '=', 'bank')]</field>
182 <field name="context">{'type':'bank'}</field>
183 <field name="view_id" ref="view_voucher_tree"/>
184 <field name="search_view_id" ref="view_voucher_filter_new"/>
187 <menuitem action="action_cheque_register" id="menu_action_cheque_register" parent="account.menu_finance_bank_and_cash"/>
189 <record model="ir.ui.view" id="view_account_journal_form_inherit">
190 <field name="name">account.journal.form.inherit</field>
191 <field name="model">account.journal</field>
192 <field name="type">form</field>
193 <field name="inherit_id" ref="account.view_account_journal_form"/>
194 <field name="arch" type="xml">
195 <field name="allow_date" position="after">
196 <field name="max_amount" select="1"/>
202 domain="[('journal_id', '=', active_id)]"
203 id="act_journal_voucher_open"
204 name="Voucher Entries"
205 context="{'journal_id': active_id, 'type':type}"
206 res_model="account.voucher"
207 src_model="account.journal"/>