[MERGE] forward port of branch 8.0 up to ed1c173
[odoo/odoo.git] / addons / account / account_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!-- Fiscal Year -->
6         <record id="view_account_fiscalyear_form" model="ir.ui.view">
7             <field name="name">account.fiscalyear.form</field>
8             <field name="model">account.fiscalyear</field>
9             <field name="arch" type="xml">
10                 <form string="Fiscal year">
11                 <header>
12                     <button name="create_period" states="draft" string="Create Monthly Periods" type="object" class="oe_highlight"/>
13                     <button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" class="oe_highlight"/>
14                     <field name="state" widget="statusbar" nolabel="1" />
15                 </header>
16                     <group>
17                         <group>
18                             <field name="name"/>
19                             <field name="code"/>
20                             <field name="company_id" groups="base.group_multi_company"/>
21                             <field name="end_journal_period_id"/>
22                         </group>
23                         <group>
24                             <field name="date_start"/>
25                             <field name="date_stop"/>
26                         </group>
27                     </group>
28                     <field colspan="4" name="period_ids" nolabel="1" widget="one2many_list">
29                         <form string="Period">
30                             <group col="4">
31                                 <field name="name"/>
32                                 <field name="code"/>
33                                 <field name="date_start"/>
34                                 <field name="date_stop"/>
35                                 <field name="special"/>
36                                 <field name="state" invisible="1"/>
37                             </group>
38                         </form>
39                     </field>
40                 </form>
41             </field>
42         </record>
43         <record id="view_account_fiscalyear_tree" model="ir.ui.view">
44             <field name="name">account.fiscalyear.tree</field>
45             <field name="model">account.fiscalyear</field>
46             <field name="arch" type="xml">
47                 <tree colors="blue:state == 'draft';gray:state == 'done' " string="Fiscalyear">
48                     <field name="code"/>
49                     <field name="name"/>
50                     <field name="company_id" groups="base.group_multi_company"/>
51                     <field name="state"/>
52                 </tree>
53             </field>
54         </record>
55         <record id="view_account_fiscalyear_search" model="ir.ui.view">
56             <field name="name">account.fiscalyear.search</field>
57             <field name="model">account.fiscalyear</field>
58             <field name="arch" type="xml">
59                 <search string="Search Fiscalyear">
60                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Fiscal Year"/>
61                     <filter string="Open" domain="[('state','=','draft')]" icon="terp-camera_test"/>
62                     <filter string="Closed" domain="[('state','=','done')]" icon="terp-dialog-close"/>
63                     <field name="state"/>
64                     <group expand="0" string="Group By">
65                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
66                     </group>
67                 </search>
68             </field>
69         </record>
70         <record id="action_account_fiscalyear" model="ir.actions.act_window">
71             <field name="name">Fiscal Years</field>
72             <field name="res_model">account.fiscalyear</field>
73             <field name="view_type">form</field>
74             <field name="view_mode">tree,form</field>
75             <field name="help" type="html">
76               <p class="oe_view_nocontent_create">
77                 Click to start a new fiscal year.
78               </p><p>
79                 Define your company's financial year according to your needs. A
80                 financial year is a period at the end of which a company's
81                 accounts are made up (usually 12 months). The financial year is
82                 usually referred to by the date in which it ends. For example,
83                 if a company's financial year ends November 30, 2011, then
84                 everything between December 1, 2010 and November 30, 2011
85                 would be referred to as FY 2011.
86               </p>
87             </field>
88         </record>
89         <menuitem id="next_id_23" name="Periods" parent="account.menu_finance_configuration" sequence="5" />
90         <menuitem id="menu_action_account_fiscalyear" action="action_account_fiscalyear" parent="next_id_23"/>
91
92         <!-- Period -->
93         <record id="view_account_period_form" model="ir.ui.view">
94             <field name="name">account.period.form</field>
95             <field name="model">account.period</field>
96             <field name="arch" type="xml">
97                 <form string="Account Period">
98                     <header>
99                         <button string="Close Period" name="%(account.action_account_period_close)d" type="action" class="oe_highlight" states="draft"/>
100                         <button name="action_draft" states="done" string="Re-Open Period" type="object" groups="account.group_account_manager"/>
101                         <field name="state" widget="statusbar" nolabel="1"/>
102                     </header>
103                     <group>
104                         <group>
105                             <field name="name"/>
106                             <field name="fiscalyear_id" widget="selection"/>
107                             <label for="date_start" string="Duration"/>
108                             <div>
109                                 <field name="date_start" class="oe_inline" nolabel="1"/> -
110                                 <field name="date_stop" nolabel="1" class="oe_inline"/>
111                             </div>
112                         </group>
113                         <group>
114                             <field name="code"/>
115                             <field name="special"/>
116                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
117                         </group>
118                     </group>
119                 </form>
120             </field>
121         </record>
122         <record id="view_account_period_tree" model="ir.ui.view">
123             <field name="name">account.period.tree</field>
124             <field name="model">account.period</field>
125             <field name="arch" type="xml">
126               <tree colors="blue:state == 'draft';gray:state == 'done' " string="Period">
127                     <field name="name"/>
128                     <field name="code"/>
129                     <field name="date_start"/>
130                     <field name="date_stop"/>
131                     <field name="special"/>
132                     <field name="company_id" groups="base.group_multi_company"/>
133                     <field name="state"/>
134                 </tree>
135             </field>
136         </record>
137         <record id="view_account_period_search" model="ir.ui.view">
138             <field name="name">account.period.search</field>
139             <field name="model">account.period</field>
140             <field name="arch" type="xml">
141                 <search string="Search Period">
142                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Period"/>
143                     <filter string="To Close" name="draft" domain="[('state','=','draft')]" icon="terp-dialog-close"/>
144                 </search>
145             </field>
146         </record>
147         <record id="action_account_period" model="ir.actions.act_window">
148             <field name="name">Periods</field>
149             <field name="res_model">account.period</field>
150             <field name="view_type">form</field>
151             <field name="view_mode">tree,form</field>
152             <field name="context">{'search_default_draft': 1}</field>
153             <field name="help" type="html">
154               <p class="oe_view_nocontent_create">
155                 Click to add a fiscal period.
156               </p><p>
157                 An accounting period typically is a month or a quarter. It
158                 usually corresponds to the periods of the tax declaration.
159               </p>
160             </field>
161         </record>
162         <menuitem id="menu_action_account_period" action="action_account_period" parent="account.next_id_23"/>
163
164         <!-- Accounts -->
165         <record id="view_account_form" model="ir.ui.view">
166             <field name="name">account.account.form</field>
167             <field name="model">account.account</field>
168             <field name="arch" type="xml">
169                 <form string="Account">
170                     <label for="code" class="oe_edit_only" string="Account Code and Name"/>
171                     <h1>
172                         <field name="code" class="oe_inline" placeholder="Account code" style="width: 6em"/> -
173                         <field name="name" class="oe_inline" placeholder="Account name"/>
174                     </h1>
175                     <group>
176                         <group>
177                             <field name="parent_id"/>
178                             <field name="type"/>
179                             <field name="user_type"/>
180                             <field name="active"/>
181                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
182                         </group>
183                         <group>
184                             <field name="debit" attrs="{'readonly':[('type','=','view')]}"/>
185                             <field name="credit" attrs="{'readonly':[('type','=','view')]}"/>
186                             <field name="balance"/>
187                         </group>
188                         <group>
189                             <field name="tax_ids" domain="[('parent_id','=',False)]" widget="many2many_tags"/>
190                             <field name="reconcile"/>
191                             <field name="child_consol_ids"
192                                 attrs="{'invisible':[('type','!=','consolidation')]}"
193                                 widget="many2many_tags"/>
194                         </group>
195                         <group groups="base.group_multi_currency">
196                             <field name="currency_id"/>
197                             <field name="currency_mode" attrs="{'readonly': [('currency_id','=',False)]}"/>
198                         </group>
199                     </group>
200                     <label for="note"/>
201                     <field name="note"/>
202                 </form>
203             </field>
204         </record>
205         <record id="view_account_list" model="ir.ui.view">
206             <field name="name">account.account.list</field>
207             <field name="model">account.account</field>
208             <field name="field_parent">child_id</field>
209             <field name="arch" type="xml">
210                 <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >
211                     <field name="code"/>
212                     <field name="name"/>
213                     <field name="parent_id" invisible="1"/>
214                     <field name="user_type" invisible="1"/>
215                     <field name="debit"/>
216                     <field name="credit"/>
217                     <field name="balance"/>
218                     <field name="type"/>
219                     <field name="company_id" groups="base.group_multi_company"/>
220                     <field name="company_currency_id"/>
221                 </tree>
222             </field>
223         </record>
224         <record id="view_account_search" model="ir.ui.view">
225             <field name="name">account.account.search</field>
226             <field name="model">account.account</field>
227             <field name="arch" type="xml">
228                 <search string="Accounts">
229                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account"/>
230                     <filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
231                     <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
232                     <field name="user_type"/>
233                     <group expand="0" string="Group By">
234                         <filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
235                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'user_type'}"/>
236                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'type'}"/>
237                     </group>
238                 </search>
239             </field>
240         </record>
241         <record id="action_account_form" model="ir.actions.act_window">
242             <field name="name">Accounts</field>
243             <field name="res_model">account.account</field>
244             <field name="view_type">form</field>
245             <field name="view_mode">tree,form,graph</field>
246             <field name="search_view_id" ref="view_account_search"/>
247             <field name="view_id" ref="view_account_list"/>
248             <field name="help" type="html">
249               <p class="oe_view_nocontent_create">
250                 Click to add an account.
251               </p><p>
252                 An account is part of a ledger allowing your company
253                 to register all kinds of debit and credit transactions.
254                 Companies present their annual accounts in two main parts: the
255                 balance sheet and the income statement (profit and loss
256                 account). The annual accounts of a company are required by law
257                 to disclose a certain amount of information.
258               </p>
259             </field>
260         </record>
261         <menuitem id="account_account_menu" name="Accounts" parent="account.menu_finance_configuration" sequence="15"/>
262         <menuitem action="action_account_form" id="menu_action_account_form" parent="account_account_menu"/>
263
264         <act_window
265             id="act_account_acount_move_line_open_unreconciled"
266             name="Unreconciled Entries"
267             res_model="account.move.line"
268             context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}"
269             src_model="account.account"/>
270
271         <record id="view_account_tree" model="ir.ui.view">
272             <field name="name">account.account.tree</field>
273             <field name="model">account.account</field>
274             <field name="field_parent">child_id</field>
275             <field name="arch" type="xml">
276                 <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >
277                     <field name="code"/>
278                     <field name="name"/>
279                     <field name="debit"/>
280                     <field name="credit"/>
281                     <field name="balance"/>
282                     <field name="company_currency_id"/>
283                     <field name="company_id" groups="base.group_multi_company"/>
284                     <field name="type"/>
285                     <field name="parent_id" invisible="1"/>
286                 </tree>
287             </field>
288         </record>
289         <record id="action_account_tree" model="ir.actions.act_window">
290             <field name="name">Chart of Accounts</field>
291             <field name="res_model">account.account</field>
292             <field name="view_type">tree</field>
293             <field name="view_id" ref="view_account_tree"/>
294             <field name="domain">[('parent_id','=',False)]</field>
295         </record>
296         <record id="view_account_gain_loss_tree" model="ir.ui.view">
297            <field name="name">Unrealized Gain or Loss</field>
298             <field name="model">account.account</field>
299             <field name="arch" type="xml">
300                 <tree string="Unrealized Gains and losses" create="false">
301                     <field name="code"/>
302                     <field name="name"/>
303                     <field name="parent_id" invisible="1"/>
304                     <field name="user_type" invisible="1"/>
305                     <field name="type" invisible="1"/>
306                     <field name="currency_id"/>
307                     <field name="exchange_rate"/>
308                     <field name="foreign_balance"/>
309                     <field name="adjusted_balance"/>
310                     <field name="balance"/>
311                     <field name="unrealized_gain_loss"/>
312                 </tree>
313             </field>
314         </record>
315         <record id="action_account_gain_loss" model="ir.actions.act_window">
316             <field name="name">Unrealized Gain or Loss</field>
317             <field name="res_model">account.account</field>
318             <field name="view_type">form</field>
319             <field name="view_mode">tree</field>
320             <field name="view_id" ref="view_account_gain_loss_tree"/>
321             <field name="domain">[('currency_id','!=',False)]</field>
322             <field name="help" type="html">
323               <p class="oe_view_nocontent_create">
324                 Click to add an account.
325               </p><p>
326                 When doing multi-currency transactions, you may loose or gain
327                 some amount due to changes of exchange rate. This menu gives
328                 you a forecast of the Gain or Loss you'd realized if those
329                 transactions were ended today. Only for accounts having a
330                 secondary currency set.
331               </p>
332             </field>
333         </record>
334         <menuitem
335             name="Unrealized Gain or Loss"
336             action="action_account_gain_loss"
337             groups="account.group_account_user"
338             id="menu_unrealized_gains_losses"
339             parent="account.menu_multi_currency"/>
340
341         <act_window
342             id="action_move_line_select"
343             name="Journal Items"
344             context="{'search_default_account_id': [active_id]}"
345             res_model="account.move.line"
346             src_model="account.account"/>
347
348         <!-- Enable drill-down from Chart Of Accounts tree view -->
349         <act_window
350             id="action_account_items"
351             name="Journal Items"
352             context="{'search_default_account_id': [active_id], 'fiscalyear': context.get('fiscalyear')}"
353             res_model="account.move.line"
354             src_model="account.account"
355             key2="tree_but_open"/>
356
357         <!-- Account Journal -->
358         <record id="view_account_journal_tree" model="ir.ui.view">
359             <field name="name">account.journal.tree</field>
360             <field name="model">account.journal</field>
361             <field name="arch" type="xml">
362                 <tree string="Account Journal">
363                     <field name="code"/>
364                     <field name="name"/>
365                     <field name="type"/>
366                     <field name="user_id"/>
367                     <field name="company_id" groups="base.group_multi_company"/>
368                 </tree>
369             </field>
370         </record>
371         <record id="view_account_journal_search" model="ir.ui.view">
372             <field name="name">account.journal.search</field>
373             <field name="model">account.journal</field>
374             <field name="arch" type="xml">
375                 <search string="Search Account Journal">
376                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Journal"/>
377                     <filter domain="['|', ('type', '=', 'sale'), ('type', '=', 'sale_refund')]" string="Sale" icon="terp-camera_test"/>
378                     <filter domain="['|', ('type', '=', 'purchase'), ('type', '=', 'purchase_refund')]" string="Purchase" icon="terp-purchase"/>
379                     <filter domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]" string="Liquidity" icon="terp-dolar"/>
380                     <filter domain="['|', ('type', '=', 'general'), ('type', '=', 'situation')]" string="Others" icon="terp-stock"/>
381                     <field name="user_id"/>
382                     <group expand="0" string="Group By">
383                         <filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
384                         <filter string="Type" context="{'group_by':'type'}" icon="terp-stock_symbol-selection"/>
385                         <filter string="Company" context="{'group_by':'company_id'}" icon="terp-go-home" groups="base.group_multi_company"/>
386                     </group>
387                 </search>
388             </field>
389         </record>
390         <record id="view_account_journal_form" model="ir.ui.view">
391             <field name="name">account.journal.form</field>
392             <field name="model">account.journal</field>
393             <field name="arch" type="xml">
394                 <form string="Account Journal">
395                     <div class="oe_title">
396                         <label for="name" class="oe_edit_only"/>
397                         <h1><field name="name"/></h1>
398                     </div>
399                     <group>
400                         <group>
401                             <field name="code"/>
402                             <field name="type"/>
403                         </group>
404                         <group>
405                             <field name="default_debit_account_id" attrs="{'required':[('type','in', ('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
406                             <field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
407                             <field name="currency" groups="base.group_multi_currency"/>
408                             <field name="company_id" groups="base.group_multi_company"/>
409                         </group>
410                     </group>
411                     <notebook>
412                         <page string="Advanced Settings">
413                             <group>
414                                 <group>
415                                     <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_user']}"/>
416                                     <field name="sequence_id" required="0"/>
417                                 </group>
418                                 <group>
419                                     <field name="centralisation"/>
420                                     <field name="entry_posted"/>
421                                     <field name="allow_date"/>
422                                     <field name="group_invoice_lines"/>
423                                 </group>
424                             </group>
425                         </page>
426                         <page string="Entry Controls">
427                             <separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
428                             <field colspan="4" name="type_control_ids" nolabel="1"/>
429                             <separator colspan="4" string="Accounts Allowed (empty for no control)"/>
430                             <field colspan="4" name="account_control_ids" nolabel="1"/>
431                         </page>
432                         <page string="Cash Registers">
433                             <group>
434                                 <group string="Accounts">
435                                     <field name="profit_account_id" domain="[('type','!=','view')]"/>
436                                     <field name="loss_account_id" domain="[('type','!=','view')]"/>
437                                     <field name="internal_account_id" domain="[('type','!=','view')]"/>
438                                 </group>
439                                 <group string="Miscellaneous">
440                                     <field name="with_last_closing_balance" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
441                                     <field name="cash_control" attrs="{'invisible':[('type','not in', ('cash',))]}"/>
442                                 </group>
443                             </group>
444                             <separator string="Available Coins" colspan="4" attrs="{'invisible' : ['|',('cash_control', '=', False),('type','not in', ('cash',))] }"/>
445                             <field name="cashbox_line_ids" nolabel="1" string="Unit Of Currency Definition" colspan="4" attrs="{'invisible' : ['|',('cash_control', '=', False),('type','not in', ('cash',))]}">
446                                 <tree string="CashBox Lines" editable="bottom">
447                                     <field name="pieces" />
448                                 </tree>
449                             </field>
450                         </page>
451                     </notebook>
452                 </form>
453             </field>
454         </record>
455         <record id="action_account_journal_form" model="ir.actions.act_window">
456             <field name="name">Journals</field>
457             <field name="res_model">account.journal</field>
458             <field name="view_type">form</field>
459             <field name="view_mode">tree,form</field>
460             <field name="help" type="html">
461               <p class="oe_view_nocontent_create">
462                 Click to add a journal.
463               </p><p>
464                 A journal is used to record transactions of all accounting data
465                 related to the day-to-day business.
466               </p><p>
467                 A typical company may use one journal per payment method (cash,
468                 bank accounts, checks), one purchase journal, one sale journal
469                 and one for miscellaneous information.
470               </p>
471             </field>
472         </record>
473         <menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="menu_journals"/>
474
475         <act_window
476            id="act_account_journal_2_account_bank_statement"
477            name="Bank statements"
478            context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
479            res_model="account.bank.statement"
480            src_model="account.journal"/>
481
482         <act_window
483            id="act_account_journal_2_account_move_line"
484            name="Journal Items"
485            context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
486            res_model="account.move.line"
487            src_model="account.journal"/>
488
489         <!-- Bank statement -->
490         
491         <record id="action_bank_reconcile_bank_statements" model="ir.actions.client">
492             <field name="name">Reconciliation on Bank Statements</field>
493             <field name="tag">bank_statement_reconciliation_view</field>
494             <field name="context">{'statement_ids': [active_id]}</field>
495         </record>
496         
497         <record id="view_account_bank_statement_filter" model="ir.ui.view">
498             <field name="name">account.cash.statement.select</field>
499             <field name="model">account.bank.statement</field>
500             <field name="arch" type="xml">
501                 <search string="Search Bank Statements">
502                     <field name="name" string="Bank Statement"/>
503                     <field name="date"/>
504                     <filter string="Draft" name="state_draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
505                     <filter string="Open" name="state_open" domain="[('state','=','open')]" icon="terp-check"/>
506                     <filter string="Confirmed" name="state_confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
507                     <field name="journal_id" domain="[('type', '=', 'cash')]" />
508                     <group expand="0" string="Group By">
509                         <filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
510                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
511                         <filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
512                     </group>
513                 </search>
514             </field>
515         </record>
516
517         <record id="view_bank_statement_tree" model="ir.ui.view">
518             <field name="name">account.bank.statement.tree</field>
519             <field name="model">account.bank.statement</field>
520             <field name="arch" type="xml">
521                 <tree colors="red:balance_end_real!=balance_end and state=='draft';blue:state=='draft' and (balance_end_real==balance_end);black:state=='confirm'" string="Statement">
522                     <field name="name"/>
523                     <field name="date"/>
524                     <field name="period_id"/>
525                     <field name="journal_id"/>
526                     <field name="balance_start"/>
527                     <field name="balance_end_real"/>
528                     <field name="balance_end" invisible="1"/>
529                     <field name="state"/>
530                 </tree>
531             </field>
532         </record>
533         
534         <record id="view_bank_statement_search" model="ir.ui.view">
535             <field name="name">account.bank.statement.search</field>
536             <field name="model">account.bank.statement</field>
537             <field name="arch" type="xml">
538                 <search string="Search Bank Statements">
539                     <field name="name" string="Bank Statement"/>
540                     <field name="date"/>
541                     <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
542                     <filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
543                     <field name="period_id"/>
544                     <field name="journal_id" domain="[('type', '=', 'bank')]" />
545                     <group expand="0" string="Group By">
546                         <filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
547                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
548                         <filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
549                     </group>
550                 </search>
551             </field>
552         </record>
553         
554         <record id="view_bank_statement_form" model="ir.ui.view">
555             <field name="name">account.bank.statement.form</field>
556             <field name="model">account.bank.statement</field>
557             <field name="priority">1</field>
558             <field name="arch" type="xml">
559                 <form string="Bank Statement">
560                 <header>
561                     <field name="all_lines_reconciled" invisible="1" />
562                     <span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
563                         <button name="%(action_bank_reconcile_bank_statements)d" states="draft" string="Reconcile" type="action" class="oe_highlight"/>
564                     </span>
565                     <span attrs="{'invisible':[('all_lines_reconciled','=',False)]}">
566                         <button name="button_confirm_bank" states="draft" string="Close" type="object" class="oe_highlight"/>
567                     </span>
568                     <button name="button_cancel" states="confirm" string="Cancel Statement" type="object"/>
569                     <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
570                 </header>
571                 <sheet>
572                     <div class="oe_right oe_button_box" name="import_buttons">
573                         <button class="oe_inline oe_stat_button" name="%(action_view_account_statement_from_invoice_lines)d"
574                             string="Import Invoice" type="action"
575                             attrs="{'invisible':[('state','=','confirm')]}" widget="statinfo" icon="fa-pencil-square-o"/>
576                         <button class="oe_inline oe_stat_button" name="button_journal_entries"
577                                 string="Journal Items" type="object"
578                                 attrs="{'invisible':[('move_line_ids','=',[])]}" icon="fa-bars"/>
579                         <field name="move_line_ids" invisible="1"/>
580                     </div>
581                     <label for="name" class="oe_edit_only"/>
582                     <h1><field name="name"/></h1>
583                     <group>
584                         <group>
585                             <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" attrs="{'readonly': [('move_line_ids', '!=', [])]}" widget="selection"/>
586                             <label for="date" string="Date / Period"/>
587                             <div>
588                                 <field name="date" on_change="onchange_date(date, company_id)" class="oe_inline"/>
589                                 <field name="period_id" class="oe_inline"/>
590                             </div>
591                             <field name='company_id' widget="selection" groups="base.group_multi_company" />
592                             <field name="currency" invisible="1"/>
593                         </group><group>
594                             <field name="balance_start" widget="monetary" options='{"currency_field" : "currency"}'/>
595                             <field name="balance_end_real" widget="monetary" options='{"currency_field" : "currency"}'/>
596                         </group>
597                     </group>
598
599                     <notebook>
600                         <page string="Transactions" name="statement_line_ids">
601                             <field name="line_ids" context="{'date':date}">
602                                 <tree editable="bottom" string="Statement lines" colors="grey:journal_entry_id!=False">
603                                     <field name="sequence" readonly="1" invisible="1"/>
604                                     <field name="journal_entry_id" invisible="1"/>
605                                     <field name="date" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
606                                     <field name="name" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
607                                     <field name="ref" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
608                                     <field name="partner_id" domain="[
609                                         '&amp;',
610                                             '|',('parent_id','=',False),('is_company','=',True),
611                                             '|',('customer','=',True),('supplier','=',True)]"
612                                          context="{'default_supplier': 1}"
613                                          attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
614                                     <field name="amount" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
615                                     <field name="amount_currency" groups="base.group_multi_currency" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
616                                     <field name="currency_id" groups="base.group_multi_currency" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
617                                     <field name="bank_account_id" groups="base.group_no_one"/>
618                                 </tree>
619                             </field>
620                         </page>
621                     </notebook>
622                     <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
623                         <div class="oe_subtotal_footer_separator oe_inline">
624                             <label for="balance_end" />
625                             <button name="button_dummy" states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
626                         </div>
627                         <field name="balance_end" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
628                     </group>
629                     <div class="oe_clear"/>
630                 </sheet>
631                 </form>
632             </field>
633         </record>
634
635         <record id="action_bank_statement_tree" model="ir.actions.act_window">
636             <field name="name">Bank Statements</field>
637             <field name="res_model">account.bank.statement</field>
638             <field name="view_type">form</field>
639             <field name="view_mode">tree,form,graph</field>
640             <field name="domain">[('journal_id.type', '=', 'bank')]</field>
641             <field name="context">{'journal_type':'bank'}</field>
642             <field name="search_view_id" ref="view_bank_statement_search"/>
643             <field name="help" type="html">
644               <p class="oe_view_nocontent_create">
645                 Click to register a bank statement.
646               </p><p>
647                 A bank statement is a summary of all financial transactions
648                 occurring over a given period of time on a bank account. You
649                 should receive this periodicaly from your bank.
650               </p><p>
651                 Odoo allows you to reconcile a statement line directly with
652                 the related sale or puchase invoices.
653               </p>
654             </field>
655         </record>
656         <record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank">
657             <field name="sequence" eval="1"/>
658             <field name="view_mode">tree</field>
659             <field name="view_id" ref="view_bank_statement_tree"/>
660             <field name="act_window_id" ref="action_bank_statement_tree"/>
661         </record>
662         <record model="ir.actions.act_window.view" id="action_bank_statement_form_bank">
663             <field name="sequence" eval="1"/>
664             <field name="view_mode">form</field>
665             <field name="view_id" ref="view_bank_statement_form"/>
666             <field name="act_window_id" ref="action_bank_statement_tree"/>
667         </record>
668
669         <menuitem string="Bank Statements" action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_bank_and_cash" sequence="7"/>
670
671         <record id="action_bank_statement_draft_tree" model="ir.actions.act_window">
672             <field name="name">Draft statements</field>
673             <field name="res_model">account.bank.statement</field>
674             <field name="view_type">form</field>
675             <field name="view_mode">tree,form</field>
676             <field name="domain">[('state','=','draft')]</field>
677             <field name="filter" eval="True"/>
678         </record>
679         
680         <record id="action_bank_reconcile" model="ir.actions.client">
681             <field name="name">Reconciliation on Bank Statements</field>
682             <field name="res_model">account.bank.statement.line</field>
683             <field name="tag">bank_statement_reconciliation_view</field>
684         </record>
685         
686         <!-- because of the needaction badge, groups needs to be specified -->
687         <menuitem id="menu_bank_reconcile_bank_statements" name="Reconciliation on Bank Statements" parent="account.periodical_processing_reconciliation" groups="group_account_user" action="action_bank_reconcile" sequence="20"/>
688
689         <record id="view_account_statement_operation_template_form" model="ir.ui.view">
690             <field name="name">account.statement.operation.template.form</field>
691             <field name="model">account.statement.operation.template</field>
692             <field name="arch" type="xml">
693                 <form string="Statement Operation Templates">
694                     <sheet>
695                         <div class="oe_title">
696                             <label for="name" class="oe_edit_only"/>
697                             <h1>
698                                 <field name="name"/>
699                             </h1>
700                         </div>
701                         <group>
702                             <group>
703                                 <field name="account_id" domain="[('type', 'not in', ['view', 'closed', 'consolidation'])]"/>
704                                 <field name="amount_type"/>
705                                 <field name="tax_id" domain="[('type_tax_use', 'in', ['purchase', 'all']), ('parent_id', '=', False)]"/>
706                             </group>
707                             <group>
708                                 <field name="label"/>
709                                 <label for="amount"/>
710                                 <div>
711                                     <field name="amount" class="oe_inline" />
712                                     <label string="%" class="oe_inline" attrs="{'invisible':[('amount_type','not in',('percentage_of_total', 'percentage_of_balance'))]}" />
713                                 </div>
714                                 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
715                             </group>
716                         </group>
717                     </sheet>
718                 </form>
719             </field>
720         </record>
721         <record id="view_account_statement_operation_template_tree" model="ir.ui.view">
722             <field name="name">account.statement.operation.template.tree</field>
723             <field name="model">account.statement.operation.template</field>
724             <field name="arch" type="xml">
725                 <tree string="Bank Reconciliation Move Presets">
726                     <field name="name"/>
727                     <field name="account_id"/>
728                     <field name="amount_type"/>
729                 </tree>
730             </field>
731         </record>
732         <record id="view_account_statement_operation_template_search" model="ir.ui.view">
733             <field name="name">account.statement.operation.template.search</field>
734             <field name="model">account.statement.operation.template</field>
735             <field name="arch" type="xml">
736                 <search string="Bank Reconciliation Move preset">
737                         <filter string="With tax" domain="[('tax_id','!=',False)]"/>
738                         <field name="amount_type"/>
739                 </search>
740             </field>
741         </record>
742         <record id="action_account_statement_operation_template" model="ir.actions.act_window">
743             <field name="name">Statement Operation Templates</field>
744             <field name="res_model">account.statement.operation.template</field>
745             <field name="view_type">form</field>
746             <field name="view_mode">tree,form</field>
747             <field name="search_view_id" ref="view_account_statement_operation_template_search"/>
748             <field name="help" type="html">
749               <p class="oe_view_nocontent_create">
750                 Click to create a statement operation template.
751               </p><p>
752                 Those can be used to quickly create a move line when reconciling
753                 your bank statements.
754               </p>
755             </field>
756         </record>
757         <menuitem action="action_account_statement_operation_template" id="menu_action_account_statement_operation_template" parent="menu_configuration_misc" name="Statement Operation Templates" sequence="22"/>
758
759         <!-- Account Types -->
760         <record id="view_account_type_search" model="ir.ui.view">
761             <field name="name">account.account.type.search</field>
762             <field name="model">account.account.type</field>
763             <field name="arch" type="xml">
764                 <search string="Account Type">
765                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Type"/>
766                 </search>
767             </field>
768         </record>
769         <record id="view_account_type_tree" model="ir.ui.view">
770             <field name="name">account.account.type.tree</field>
771             <field name="model">account.account.type</field>
772             <field name="arch" type="xml">
773                 <tree string="Account Type">
774                     <field name="name"/>
775                     <field name="code"/>
776                 </tree>
777             </field>
778         </record>
779         <record id="view_account_type_form" model="ir.ui.view">
780             <field name="name">account.account.type.form</field>
781             <field name="model">account.account.type</field>
782             <field name="arch" type="xml">
783                 <form string="Account Type">
784                     <group>
785                         <group>
786                             <field name="name"/>
787                             <field name="code"/>
788                         </group>
789                         <group>
790                             <field name="report_type"/>
791                             <field name="close_method"/>
792                         </group>
793                     </group>
794                     <separator string="Description"/>
795                     <field name="note"/>
796                 </form>
797             </field>
798         </record>
799         <record id="action_account_type_form" model="ir.actions.act_window">
800             <field name="name">Account Types</field>
801             <field name="res_model">account.account.type</field>
802             <field name="view_type">form</field>
803             <field name="view_mode">tree,form</field>
804             <field name="search_view_id" ref="view_account_type_search"/>
805             <field name="help" type="html">
806               <p class="oe_view_nocontent_create">
807                 Click to define a new account type.
808               </p><p>
809                 An account type is used to determine how an account is used in
810                 each journal. The deferral method of an account type determines
811                 the process for the annual closing. Reports such as the Balance
812                 Sheet and the Profit and Loss report use the category
813                 (profit/loss or balance sheet).
814               </p>
815             </field>
816         </record>
817         <menuitem action="action_account_type_form" sequence="20" id="menu_action_account_type_form" parent="account_account_menu" groups="base.group_no_one"/>
818
819         <!-- Entries -->
820         <record id="view_account_move_tree" model="ir.ui.view">
821             <field name="name">account.move.tree</field>
822             <field name="model">account.move</field>
823             <field name="arch" type="xml">
824                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
825                     <field name="name"/>
826                     <field name="ref"/>
827                     <field name="date"/>
828                     <field name="period_id"/>
829                     <field name="journal_id"/>
830                     <field name="partner_id"/>
831                     <field name="amount" sum="Total Amount"/>
832                     <field name="state"/>
833                 </tree>
834             </field>
835         </record>
836
837         <!-- Reconcile -->
838         <record id="view_move_reconcile_form" model="ir.ui.view">
839             <field name="name">account.move.reconcile.form</field>
840             <field name="model">account.move.reconcile</field>
841             <field name="arch" type="xml">
842                 <form string="Journal Entry Reconcile">
843                     <group col="4">
844                         <field name="name"/>
845                         <field name="create_date"/>
846                         <field name="type"/>
847                     </group>
848                     <separator string="Reconcile Entries"/>
849                     <field name="line_id"/>
850                     <separator string="Partial Reconcile Entries"/>
851                     <field name="line_partial_ids"/>
852                 </form>
853             </field>
854         </record>
855
856         <!-- Tax Codes -->
857         <record id="view_tax_code_search" model="ir.ui.view">
858             <field name="name">account.tax.code.search</field>
859             <field name="model">account.tax.code</field>
860             <field name="arch" type="xml">
861                 <search string="Account Tax Code">
862                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Tax Code"/>
863                     <field name="parent_id"/>
864                     <field name="company_id" groups="base.group_multi_company"/>
865                 </search>
866             </field>
867         </record>
868         <record id="view_tax_code_tree" model="ir.ui.view">
869             <field name="name">account.tax.code.tree</field>
870             <field name="model">account.tax.code</field>
871             <field name="field_parent">child_ids</field>
872             <field name="priority">100</field>
873             <field name="arch" type="xml">
874                 <tree string="Account Tax Code" toolbar="1">
875                     <field name="name"/>
876                     <field name="code"/>
877                     <field name="sum_period"/>
878                     <field name="sum"/>
879                     <field name="company_id" groups="base.group_multi_company"/>
880                 </tree>
881             </field>
882         </record>
883         <record id="view_tax_code_form" model="ir.ui.view">
884             <field name="name">account.tax.code.form</field>
885             <field name="model">account.tax.code</field>
886             <field name="arch" type="xml">
887                 <form string="Account Tax Code">
888                     <group>
889                         <group col="4" colspan="2">
890                             <field name="name"/>
891                             <field name="code"/>
892                             <field name="parent_id"/>
893                             <field name="company_id" groups="base.group_multi_company"/>
894                         </group>
895                         <group string="Reporting Configuration">
896                             <field name="notprintable"/>
897                             <field name="sign"/>
898                         </group>
899                         <group string="Statistics">
900                             <field name="sum_period"/>
901                             <field name="sum"/>
902                         </group>
903                     </group>
904                     <separator string="Description"/>
905                     <field name="info"/>
906                 </form>
907             </field>
908         </record>
909         <record id="action_tax_code_list" model="ir.actions.act_window">
910             <field name="name">Tax codes</field>
911             <field name="res_model">account.tax.code</field>
912             <field name="view_type">form</field>
913             <field name="view_mode">tree,form</field>
914             <field name="view_id" ref="view_tax_code_tree"/>
915             <field name="search_view_id" ref="view_tax_code_search"/>
916             <field name="help" type="html">
917               <p class="oe_view_nocontent_create">
918                 Click to define a new tax code.
919               </p><p>
920                 Depending on the country, a tax code is usually a cell to fill
921                 in your legal tax statement. Odoo allows you to define the
922                 tax structure and each tax computation will be registered in
923                 one or several tax code.
924               </p>
925             </field>
926         </record>
927         <menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_configuration" sequence="20"/>
928         <menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="next_id_27" sequence="12" groups="base.group_no_one"/>
929
930         <act_window
931             id="action_tax_code_line_open"
932             name="Journal Items"
933             domain="[('tax_code_id','child_of',active_id),('state','&lt;&gt;','draft')]"
934             res_model="account.move.line"
935             src_model="account.tax.code"/>
936
937         <!-- Enable drill-down from Chart Of Taxes tree view -->
938         <act_window
939             id="action_tax_code_items"
940             name="Journal Items"
941             domain="[('tax_code_id','child_of',active_id),('state','!=','draft')]"
942             res_model="account.move.line"
943             src_model="account.tax.code"
944             key2="tree_but_open"/>
945
946
947         <!-- Tax -->
948         <record id="view_tax_tree" model="ir.ui.view">
949             <field name="name">account.tax.tree</field>
950             <field name="model">account.tax</field>
951             <field name="field_parent">child_ids</field>
952             <field name="arch" type="xml">
953                 <tree string="Account Tax">
954                     <field name="name"/>
955                     <field name="price_include"/>
956                     <field name="description"/>
957                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
958                     <field name="type_tax_use" invisible="1"/>
959                 </tree>
960             </field>
961         </record>
962         <record id="view_account_tax_search" model="ir.ui.view">
963             <field name="name">account.tax.search</field>
964             <field name="model">account.tax</field>
965             <field name="arch" type="xml">
966                 <search string="Search Taxes">
967                     <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax"/>
968                     <field name="company_id" groups="base.group_multi_company"/>
969                     <filter string="Sale" domain="[('type_tax_use','=','sale')]" />
970                     <filter string="Purchase" domain="[('type_tax_use','=','purchase')]" />
971                     <group string="Group By">
972                         <filter string="Company" domain="[]" context="{'group_by':'company_id'}"/>
973                         <filter string="Tax Application" domain="[]" context="{'group_by':'type_tax_use'}"/>
974                     </group>
975                 </search>
976             </field>
977         </record>
978         <record id="view_tax_form" model="ir.ui.view">
979             <field name="name">account.tax.form</field>
980             <field name="model">account.tax</field>
981             <field name="arch" type="xml">
982                 <form string="Account Tax">
983                     <group>
984                         <group>
985                             <field name="name"/>
986                             <field name="description"/>
987                         </group>
988                         <group>
989                             <field name="type_tax_use"/>
990                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
991                             <field name="active"/>
992                         </group>
993                     </group>
994                     <notebook>
995                         <page string="Tax Definition">
996                         <group>
997                             <group string="Tax Computation">
998                                 <label for="type"/>
999                                 <div>
1000                                     <field name="type"/>
1001                                     <field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
1002                                 </div>
1003                                 <field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
1004                                 <field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
1005                                 <field name="price_include"/>
1006                             </group>
1007                             <group string="Misc">
1008                                 <field name="sequence"/>
1009                                 <field name="include_base_amount"/>
1010                                 <field name="child_depend"/>
1011                             </group>
1012                             <group string="Invoices">
1013                                   <field name="account_collected_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1014                                   <field name="account_analytic_collected_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/>
1015
1016                                   <field name="base_code_id"/>
1017                                   <field name="base_sign"/>
1018                                   <field name="tax_code_id"/>
1019                                   <field name="tax_sign"/>
1020
1021                             </group>
1022                             <group string="Refunds">
1023                                   <field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1024                                   <field name="account_analytic_paid_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/>
1025
1026                                   <field name="ref_base_code_id"/>
1027                                   <field name="ref_base_sign"/>
1028                                   <field name="ref_tax_code_id"/>
1029                                   <field name="ref_tax_sign"/>
1030                             </group>
1031                             <group string="Children/Sub Taxes" colspan="2">
1032                                 <field name="child_ids" nolabel="1" colspan="2">
1033                                       <tree string="Account Tax">
1034                                           <field name="sequence"/>
1035                                           <field name="name"/>
1036                                           <field name="price_include"/>
1037                                           <field name="description"/>
1038                                      </tree>
1039                                 </field>
1040                             </group>
1041                         </group>
1042                         </page>
1043                         <page string="Special Computation">
1044                             <group col="4">
1045                                 <separator colspan="4" string="Applicability Options"/>
1046                                 <field name="applicable_type"/>
1047                                 <field name="domain"/>
1048                                 <separator colspan="4" string="Applicable Code (if type=code)"/>
1049                                 <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
1050                             </group>
1051                         </page>
1052                     </notebook>
1053                 </form>
1054               </field>
1055         </record>
1056         <record id="action_tax_form" model="ir.actions.act_window">
1057             <field name="name">Taxes</field>
1058             <field name="res_model">account.tax</field>
1059             <field name="view_type">form</field>
1060             <field name="view_id" ref="view_tax_tree"/>
1061             <field name="domain">[('parent_id','=',False)]</field>
1062         </record>
1063         <menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27"/>
1064
1065         <record id="action_tax_code_tree" model="ir.actions.act_window">
1066             <field name="name">Chart of Taxes</field>
1067             <field name="res_model">account.tax.code</field>
1068             <field name="domain">[('parent_id','=',False)]</field>
1069             <field name="view_type">tree</field>
1070             <field name="view_id" ref="view_tax_code_tree"/>
1071         </record>
1072
1073         <!-- Journal Items -->
1074         <record id="view_move_line_form" model="ir.ui.view">
1075             <field name="name">account.move.line.form</field>
1076             <field name="model">account.move.line</field>
1077             <field eval="2" name="priority"/>
1078             <field name="arch" type="xml">
1079                 <form string="Journal Item">
1080                     <sheet>
1081                         <group>
1082                             <group>
1083                                 <field name="name"/>
1084                                 <field name="ref"/>
1085                                 <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1086                             </group>
1087                             <group>
1088                                 <field name="journal_id"/>
1089                                 <field name="period_id"/>
1090                                 <field name="company_id" required="1" groups="base.group_multi_company"/>
1091                             </group>
1092                         </group>
1093                         <notebook colspan="4">
1094                             <page string="Information">
1095                                 <group>
1096                                     <group string="Amount">
1097                                         <field name="account_id" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
1098                                         <field name="debit"/>
1099                                         <field name="credit"/>
1100                                         <field name="quantity"/>
1101                                     </group>
1102                                     <group string="Accounting Documents">
1103                                         <field name="invoice" readonly="True"/>
1104                                         <field name="move_id" required="False"/>
1105                                         <field name="statement_id" readonly="True"/>
1106                                     </group>
1107                                     <group string="Dates">
1108                                         <field name="date"/>
1109                                         <field name="date_maturity"/>
1110                                         <field name="date_created" readonly="True"/>
1111                                     </group>
1112                                     <group string="Taxes">
1113                                         <field name="tax_code_id"/>
1114                                         <field name="tax_amount"/>
1115                                         <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1116                                     </group>
1117                                     <group attrs="{'readonly':[('state','=','valid')]}" string="Currency" groups="base.group_multi_currency">
1118                                         <field name="currency_id" invisible="1"/>
1119                                         <field name="amount_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
1120                                     </group>
1121                                     <group string="Reconciliation">
1122                                         <field name="reconcile_id"/>
1123                                         <field name="reconcile_partial_id"/>
1124                                     </group>
1125                                     <group string="States">
1126                                         <field name="state"/>
1127                                         <field name="blocked"/>
1128                                     </group>
1129                                     <group groups="analytic.group_analytic_accounting" string="Analytic">
1130                                         <field name="analytic_account_id" domain="[('type','in',('normal','contract'))]"/>
1131                                     </group>
1132                                 </group>
1133                                 <field name="narration" colspan="4" nolabel="1" placeholder="Add an internal note..."/>
1134                             </page>
1135                             <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1136                                 <field name="analytic_lines" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
1137                             </page>
1138                         </notebook>
1139                     </sheet>
1140                 </form>
1141             </field>
1142         </record>
1143         <record id="view_move_line_form2" model="ir.ui.view">
1144             <field name="name">account.move.line.form2</field>
1145             <field name="model">account.move.line</field>
1146             <field eval="9" name="priority"/>
1147             <field name="arch" type="xml">
1148                 <form string="Journal Item">
1149                     <notebook colspan="4">
1150                         <page string="Information">
1151                             <group col="4">
1152                                 <separator colspan="4" string="General Information"/>
1153                                 <field name="name"/>
1154                                 <field name="date"/>
1155                                 <field name="journal_id" readonly="False"/>
1156                                 <field name="period_id" readonly="False"/>
1157                                 <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'),('company_id', '=', company_id)]"/>
1158                                 <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1159                                 <newline/>
1160                                 <field name="debit"/>
1161                                 <field name="credit"/>
1162
1163                                 <separator colspan="4" string="Optional Information"/>
1164                                 <field name="currency_id" invisible="1"/>
1165                                 <field name="amount_currency" groups="base.group_multi_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
1166                                 <field name="quantity"/>
1167                                 <field name="move_id" required="False"/>
1168                                 <newline/>
1169                                 <field name="date_maturity"/>
1170                                 <field name="date_created"/>
1171                                 <field name="date_created"/>
1172                                 <field name="blocked"/>
1173                                 <newline/>
1174                                 <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1175                                 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1176                                 <separator colspan="4" string="Status"/>
1177                                 <newline/>
1178                                 <field name="reconcile_id"/>
1179                                 <field name="reconcile_partial_id"/>
1180                                 <field name="state"/>
1181                             </group>
1182                         </page>
1183                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1184                             <field name="analytic_lines"/>
1185                         </page>
1186                     </notebook>
1187                 </form>
1188             </field>
1189         </record>
1190         <record id="view_move_line_tree" model="ir.ui.view">
1191             <field name="name">account.move.line.tree</field>
1192             <field name="model">account.move.line</field>
1193             <field eval="1" name="priority"/>
1194             <field name="arch" type="xml">
1195                 <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" create="true" on_write="on_create_write" editable="top">
1196                     <field name="journal_id" options='{"no_open":True}' invisible="context.get('journal_id',False)"/>
1197                     <field name="period_id" options='{"no_open":True}' invisible="context.get('period_id',False)"/>
1198                     <field name="date"/>
1199                     <field name="name"/>
1200                     <field name="ref"/>
1201                     <field name="statement_id" invisible="1"/>
1202                     <field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
1203                     <field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]" on_change="onchange_account_id(account_id, partner_id, context)"/>
1204                     <field name="account_tax_id" options='{"no_open":True}' invisible="context.get('journal_type', False) not in ['sale','sale_refund','purchase','purchase_refund','general']"/>
1205                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','not in',['view','template'])]" invisible="not context.get('analytic_journal_id',False)"/>
1206                     <field name="move_id" required="0"/>
1207                     <field name="debit" sum="Total Debit"/>
1208                     <field name="credit" sum="Total Credit"/>
1209                     <field name="date_maturity" invisible="context.get('journal_type', False) not in ['sale','sale_refund','purchase','purchase_refund']"/>
1210                     <field name="reconcile_ref"/>
1211                     <field name="invoice" invisible="1"/>
1212                     <field name="amount_currency" readonly="True" invisible="not context.get('currency',False)"/>
1213                     <field name="currency_id" readonly="True" invisible="not context.get('currency',False)" />
1214                     <field name="state" invisible="1"/>
1215                     <field name="company_id" invisible="1"/>
1216                 </tree>
1217             </field>
1218         </record>
1219         <record id="account_move_line_graph" model="ir.ui.view">
1220             <field name="name">account.move.line.graph</field>
1221             <field name="model">account.move.line</field>
1222             <field name="arch" type="xml">
1223                 <graph string="Account Statistics" type="bar">
1224                     <field name="account_id"/>
1225                     <field name="debit" operator="+"/>
1226                     <field name="credit" operator="+"/>
1227                 </graph>
1228             </field>
1229         </record>
1230         <record id="view_account_move_line_filter" model="ir.ui.view">
1231             <field name="name">Journal Items</field>
1232             <field name="model">account.move.line</field>
1233             <field name="arch" type="xml">
1234                 <search string="Search Journal Items">
1235                     <field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
1236                     <field name="date"/>
1237                     <filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
1238                     <separator/>
1239                     <filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
1240                     <filter name="posted" icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
1241                     <separator/>
1242                     <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items" name="unreconciled"/>
1243                     <separator/>
1244                     <filter string="Next Partner to Reconcile" help="Next Partner Entries to reconcile" name="next_partner" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
1245                     <field name="move_id" string="Number (Move)"/>
1246                     <field name="account_id"/>
1247                     <field name="partner_id"/>
1248                     <field name="journal_id" context="{'journal_id':self}" widget="selection"/> <!-- it's important to keep widget='selection' in this filter viewbecause without that the value passed in the context is not the ID but the textual value (name) of the selected journal -->
1249                     <field name="period_id" context="{'period_id':self}" widget="selection"/> <!-- it's important to keep the widget='selection' in this field, for the same reason as explained above -->
1250                     <group expand="0" string="Group By">
1251                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1252                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1253                         <filter string="Account"  icon="terp-folder-green" context="{'group_by':'account_id'}"/>
1254                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1255                     </group>
1256                 </search>
1257             </field>
1258         </record>
1259         <record id="action_account_moves_all_a" model="ir.actions.act_window">
1260             <field name="context">{'journal_type':'general'}</field>
1261             <field name="name">Journal Items</field>
1262             <field name="res_model">account.move.line</field>
1263             <field name="view_id" ref="view_move_line_tree"/>
1264             <field name="view_mode">tree_account_move_line_quickadd,form</field>
1265             <field name="help" type="html">
1266               <p class="oe_view_nocontent_create">
1267                 Select the period and the journal you want to fill.
1268               </p><p>
1269                 This view can be used by accountants in order to quickly record
1270                 entries in Odoo. If you want to record a supplier invoice,
1271                 start by recording the line of the expense account. Odoo
1272                 will propose to you automatically the Tax related to this
1273                 account and the counterpart "Account Payable".
1274               </p>
1275             </field>
1276         </record>
1277         <menuitem
1278             action="action_account_moves_all_a"
1279             icon="STOCK_JUSTIFY_FILL"
1280             id="menu_action_account_moves_all"
1281             parent="account.menu_finance_entries"
1282             sequence="1"
1283             groups="group_account_user"
1284         />
1285         <record id="action_account_moves_all_tree" model="ir.actions.act_window">
1286             <field name="name">Journal Items</field>
1287             <field name="res_model">account.move.line</field>
1288             <field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
1289             <field name="view_id" ref="view_move_line_tree"/>
1290         </record>
1291         <record id="view_move_line_tree_reconcile" model="ir.ui.view">
1292             <field name="model">account.move.line</field>
1293             <field eval="24" name="priority"/>
1294             <field name="type">tree</field>
1295             <field name="arch" type="xml">
1296                 <tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false">
1297                     <field name="date"/>
1298                     <field name="move_id"/>
1299                     <field name="ref"/>
1300                     <field name="name"/>
1301                     <field name="partner_id"/>
1302                     <field name="account_id"/>
1303                     <field name="period_id" invisible="1"/>
1304                     <field name="journal_id" invisible="1"/>
1305                     <field name="reconcile_partial_id"/>
1306                     <field name="state" invisible="1"/>
1307                     <field name="debit" sum="Total debit"/>
1308                     <field name="credit" sum="Total credit"/>
1309                 </tree_account_reconciliation>
1310             </field>
1311         </record>
1312         <record id="action_account_manual_reconcile" model="ir.actions.act_window">
1313             <field name="context">{'search_default_unreconciled': 1,'view_mode':True}</field>
1314             <field name="name">Journal Items to Reconcile</field>
1315             <field name="res_model">account.move.line</field>
1316             <field name="view_id" ref="view_move_line_tree_reconcile"/>
1317             <field name="view_mode">tree_account_reconciliation</field>
1318             <field name="help" type="html">
1319                 <p>
1320                     No journal items found.
1321                 </p>
1322             </field>
1323         </record>
1324         <menuitem
1325              name="Manual Reconciliation"
1326              action="action_account_manual_reconcile"
1327              id="menu_manual_reconcile"
1328              parent="account.periodical_processing_reconciliation"/>
1329
1330         <!-- Account.Entry Edition -->
1331         <record id="view_move_tree" model="ir.ui.view">
1332             <field name="name">account.move.tree</field>
1333             <field name="model">account.move</field>
1334             <field name="arch" type="xml">
1335                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
1336                     <field name="name"/>
1337                     <field name="ref"/>
1338                     <field name="date"/>
1339                     <field name="period_id"/>
1340                     <field name="journal_id"/>
1341                     <field name="partner_id"/>
1342                     <field name="amount" sum="Total Amount"/>
1343                     <field name="to_check"/>
1344                     <field name="state"/>
1345                 </tree>
1346             </field>
1347         </record>
1348         <record id="view_move_form" model="ir.ui.view">
1349             <field name="name">account.move.form</field>
1350             <field name="model">account.move</field>
1351             <field name="arch" type="xml">
1352                 <form string="Account Entry">
1353                     <header>
1354                         <button name="button_validate" states="draft" string="Post" type="object" class="oe_highlight" groups="account.group_account_invoice"/>
1355                         <button name="button_cancel" states="posted" string="Cancel Entry" type="object" groups="account.group_account_invoice"/>
1356                         <field name="state" widget="statusbar"/>
1357                     </header>
1358                     <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
1359                     <h1>
1360                         <field name="name" readonly="True" attrs="{'invisible':[('name','=','/')]}"/>
1361                     </h1>
1362                     <group>
1363                         <group>
1364                             <field name="journal_id"/>
1365                             <field name="period_id"/>
1366                             <field name="company_id" required="1" groups="base.group_multi_company"/>
1367                             <field name="partner_id" invisible="1"/>
1368                         </group>
1369                         <group>
1370                             <field name="ref"/>
1371                             <field name="date"/>
1372                             <field name="to_check"/>
1373                             <field name="amount" invisible="1"/>
1374                         </group>
1375                     </group>
1376                     <notebook>
1377                         <page string="Journal Items">
1378                             <field name="line_id" widget="one2many_list"
1379                               context="{'line_id': line_id , 'journal_id': journal_id }">
1380                                 <form string="Journal Item">
1381                                     <group col="6" colspan="4">
1382                                         <field name="name"/>
1383                                         <field name="ref"/>
1384                                         <field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, date, journal_id, context)"/>
1385
1386                                         <field name="journal_id"/>
1387                                         <field name="period_id"/>
1388                                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1389                                     </group>
1390                                     <notebook colspan="4">
1391                                         <page string="Information">
1392                                             <group>
1393                                                 <group string="Amount">
1394                                                     <field name="account_id" domain="[('company_id', '=', parent.company_id), ('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1395                                                     <field name="debit"/>
1396                                                     <field name="credit"/>
1397                                                     <field name="quantity"/>
1398                                                 </group>
1399
1400                                                 <group string="Accounting Documents">
1401                                                     <field name="invoice"/>
1402                                                     <field name="move_id" required="False"/>
1403                                                     <field name="statement_id"/>
1404                                                 </group>
1405
1406                                                 <group string="Dates">
1407                                                     <field name="date"/>
1408                                                     <field name="date_maturity"/>
1409                                                     <field name="date_created"/>
1410                                                 </group>
1411
1412                                                 <group string="Taxes">
1413                                                     <field name="tax_code_id"/>
1414                                                     <field name="tax_amount"/>
1415                                                     <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1416                                                 </group>
1417
1418                                                 <group string="Currency" groups="base.group_multi_currency">
1419                                                     <field name="currency_id"/>
1420                                                     <field name="amount_currency"/>
1421                                                 </group>
1422
1423                                                 <group string="Reconciliation">
1424                                                     <field name="reconcile_id"/>
1425                                                     <field name="reconcile_partial_id"/>
1426                                                 </group>
1427
1428                                                 <group string="States">
1429                                                     <field name="state"/>
1430                                                     <field name="blocked"/>
1431                                                 </group>
1432
1433                                                 <group groups="analytic.group_analytic_accounting" string="Analytic">
1434                                                     <field name="analytic_account_id"/>
1435                                                 </group>
1436                                             </group>
1437                                             <separator string="Internal Note"/>
1438                                             <field name="narration"/>
1439                                         </page>
1440                                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1441                                             <field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
1442                                         </page>
1443                                     </notebook>
1444                                 </form>
1445                                 <tree colors="blue:state == 'draft';black:state == 'posted'" editable="top" string="Journal Items">
1446                                     <field name="invoice"/>
1447                                     <field name="name"/>
1448                                     <field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, parent.date, parent.journal_id, context)"/>
1449                                     <field name="account_id" domain="[('journal_id','=',parent.journal_id),('company_id', '=', parent.company_id)]"/>
1450                                     <field name="date_maturity"/>
1451                                     <field name="debit" sum="Total Debit"/>
1452                                     <field name="credit" sum="Total Credit"/>
1453                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1454                                     <field name="amount_currency"/>
1455                                     <field name="currency_id" groups="base.group_multi_currency"/>
1456                                     <field name="tax_code_id"/>
1457                                     <field name="tax_amount"/>
1458                                     <field name="state"/>
1459                                     <field name="reconcile_id"/>
1460                                     <field name="reconcile_partial_id"/>
1461                                 </tree>
1462                             </field>
1463                             <field name="narration" colspan="4" placeholder="Add an internal note..." nolabel="1" height="50"/>
1464                         </page>
1465                     </notebook>
1466                 </form>
1467             </field>
1468         </record>
1469         <record id="view_account_move_filter" model="ir.ui.view">
1470             <field name="name">account.move.select</field>
1471             <field name="model">account.move</field>
1472             <field name="arch" type="xml">
1473                 <search string="Search Move">
1474                     <field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
1475                     <field name="date"/>
1476                     <filter icon="terp-document-new" string="Unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
1477                     <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
1478                     <separator/>
1479                     <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('to_check','=',True)]" help="Journal Entries to Review"/>
1480                     <field name="partner_id"/>
1481                     <field name="journal_id"/>
1482                     <field name="period_id"/>
1483                     <group expand="0" string="Group By">
1484                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1485                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1486                         <filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1487                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1488                         <filter string="Entries Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Journal Entries by Month"/>
1489                     </group>
1490                 </search>
1491             </field>
1492         </record>
1493         <record id="action_move_journal_line" model="ir.actions.act_window">
1494             <field name="name">Journal Entries</field>
1495             <field name="res_model">account.move</field>
1496             <field name="view_type">form</field>
1497             <field name="view_mode">tree,form</field>
1498             <field name="view_id" ref="view_move_tree"/>
1499             <field name="search_view_id" ref="view_account_move_filter"/>
1500             <field name="help" type="html">
1501               <p class="oe_view_nocontent_create">
1502                 Click to create a journal entry.
1503               </p><p>
1504                 A journal entry consists of several journal items, each of
1505                 which is either a debit or a credit transaction.
1506               </p><p>
1507                 Odoo automatically creates one journal entry per accounting
1508                 document: invoice, refund, supplier payment, bank statements,
1509                 etc. So, you should record journal entries manually only/mainly
1510                 for miscellaneous operations.
1511               </p>
1512             </field>
1513         </record>
1514         <menuitem
1515             icon="STOCK_JUSTIFY_FILL"
1516             action="action_move_journal_line"
1517             id="menu_action_move_journal_line_form"
1518             parent="account.menu_finance_entries"
1519             groups="group_account_user"
1520             sequence="5"/>
1521
1522         <record id="action_move_line_form" model="ir.actions.act_window">
1523             <field name="name">Entries</field>
1524             <field name="type">ir.actions.act_window</field>
1525             <field name="res_model">account.move</field>
1526             <field name="view_type">form</field>
1527             <field name="view_id" ref="view_move_tree"/>
1528             <field name="search_view_id" ref="view_account_move_filter"/>
1529         </record>
1530
1531         <act_window
1532             id="act_account_move_to_account_move_line_open"
1533             name="Journal Items"
1534             context="{'search_default_move_id': active_id, 'default_move_id': active_id}"
1535             res_model="account.move.line"
1536             src_model="account.move"/>
1537
1538         <act_window
1539             domain="[('reconcile_id', '=', active_id)]"
1540             id="act_account_acount_move_line_reconcile_open"
1541             name="Reconciled entries"
1542             res_model="account.move.line"
1543             src_model="account.move.reconcile"/>
1544
1545         <!-- TODO: Print Journal (and change state), Close Journal (and verify that there is no draft Entry Lines) -->
1546         <record id="view_journal_period_tree" model="ir.ui.view">
1547             <field name="name">account.journal.period.tree</field>
1548             <field name="model">account.journal.period</field>
1549             <field name="arch" type="xml">
1550                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'printed'" string="Journals">
1551                     <field icon="icon" name="fiscalyear_id"/>
1552                     <field name="period_id"/>
1553                     <field name="journal_id"/>
1554                     <field name="state"/>
1555                     <field name="company_id" groups="base.group_multi_company"/>
1556                 </tree>
1557             </field>
1558         </record>
1559         <record id="action_account_journal_period_tree" model="ir.actions.act_window">
1560             <field name="name">Journals</field>
1561             <field name="res_model">account.journal.period</field>
1562             <field name="view_type">tree</field>
1563         </record>
1564
1565         <!-- Account Models -->
1566         <record id="view_model_line_tree" model="ir.ui.view">
1567             <field name="name">account.model.line.tree</field>
1568             <field name="model">account.model.line</field>
1569             <field name="arch" type="xml">
1570                 <tree string="Journal Entry Model Line" editable="bottom">
1571                     <field name="sequence"/>
1572                     <field name="name"/>
1573                     <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1574                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1575                     <field name="partner_id"/>
1576                     <field name="debit"/>
1577                     <field name="credit"/>
1578                     <field name="date_maturity"/>
1579                 </tree>
1580             </field>
1581         </record>
1582         <record id="view_model_line_form" model="ir.ui.view">
1583             <field name="name">account.model.line.form</field>
1584             <field name="model">account.model.line</field>
1585             <field name="arch" type="xml">
1586                 <form string="Journal Entry Model Line">
1587                     <group col="4">
1588                         <field colspan="4" name="name"/>
1589                         <field name="sequence"/>
1590                         <field name="account_id" domain="[('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1591                         <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1592                         <field name="partner_id"/>
1593                         <field name="debit"/>
1594                         <field name="credit"/>
1595                         <field name="quantity"/>
1596                         <field name="date_maturity"/>
1597                     </group>
1598                 </form>
1599             </field>
1600         </record>
1601         <record id="view_model_form" model="ir.ui.view">
1602             <field name="name">account.model.form</field>
1603             <field name="model">account.model</field>
1604             <field name="arch" type="xml">
1605                 <form string="Journal Entry Model">
1606                     <group col="4">
1607                         <field name="name"/>
1608                         <field name="journal_id" on_change="onchange_journal_id(journal_id)"/>
1609                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1610                     </group>
1611
1612                     <field name="lines_id" widget="one2many_list"/>
1613                     <separator string="Legend"/>
1614                     <field name="legend"/>
1615                     <button name="%(action_account_use_model_create_entry)d" string="Create entries" type="action" icon="gtk-execute"/>
1616                 </form>
1617             </field>
1618         </record>
1619         <record id="view_model_tree" model="ir.ui.view">
1620             <field name="name">account.model.tree</field>
1621             <field name="model">account.model</field>
1622             <field name="arch" type="xml">
1623                 <tree string="Journal Entry Model">
1624                     <field name="name"/>
1625                     <field name="journal_id"/>
1626                     <field name="company_id" groups="base.group_multi_company"/>
1627                 </tree>
1628             </field>
1629         </record>
1630         <record id="view_model_search" model="ir.ui.view">
1631             <field name="name">account.model.search</field>
1632             <field name="model">account.model</field>
1633             <field name="arch" type="xml">
1634                 <search string="Journal Entry Model">
1635                     <field name="name" string="Journal Entry Model"/>
1636                     <filter string="Sale" icon="terp-camera_test" domain="[('journal_id.type', '=', 'sale')]"/>
1637                     <filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
1638                     <field name="journal_id"/>
1639                     <field name="company_id" groups="base.group_multi_company"/>
1640                     <group expand="0" string="Group By">
1641                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1642                     </group>
1643                 </search>
1644             </field>
1645         </record>
1646
1647         <record id="action_model_form" model="ir.actions.act_window">
1648             <field name="name">Recurring Models</field>
1649             <field name="res_model">account.model</field>
1650             <field name="view_type">form</field>
1651             <field name="view_mode">tree,form</field>
1652             <field name="search_view_id" ref="view_model_search"/>
1653         </record>
1654         <menuitem
1655             action="action_model_form" name="Models" id="menu_action_model_form" sequence="5"
1656             parent="account.menu_finance_recurrent_entries"/>
1657
1658         <!-- Payment Terms -->
1659         <record id="view_payment_term_line_tree" model="ir.ui.view">
1660             <field name="name">account.payment.term.line.tree</field>
1661             <field name="model">account.payment.term.line</field>
1662             <field name="arch" type="xml">
1663                 <tree string="Payment Term">
1664                     <field name="value"/>
1665                     <field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
1666                     <field name="days"/>
1667                     <field name="days2"/>
1668                 </tree>
1669             </field>
1670         </record>
1671         <record id="view_payment_term_line_form" model="ir.ui.view">
1672             <field name="name">account.payment.term.line.form</field>
1673             <field name="model">account.payment.term.line</field>
1674             <field name="arch" type="xml">
1675                 <form string="Payment Term">
1676                     <group>
1677                         <group string="Amount Computation">
1678                             <field name="value" widget="radio" nolabel="1" colspan="4"/>
1679                             <label for="value_amount" string="Amount To Pay"  attrs="{'invisible':[('value','=','balance')]}"/>
1680                             <div attrs="{'invisible':[('value','=','balance')]}">
1681                                 <field name="value_amount" class="oe_inline"/>
1682                             </div>
1683                         </group>
1684                         <group string="Due Date Computation">
1685                             <field name="days"/>
1686                             <field name="days2"/>
1687                         </group>
1688                     </group>
1689                 </form>
1690             </field>
1691         </record>
1692         <record id="view_payment_term_search" model="ir.ui.view">
1693             <field name="name">account.payment.term.search</field>
1694             <field name="model">account.payment.term</field>
1695             <field name="arch" type="xml">
1696                 <search string="Payment Term">
1697                     <field name="name" string="Payment Term"/>
1698                     <field name="active"/>
1699                 </search>
1700             </field>
1701         </record>
1702         <record id="view_payment_term_form" model="ir.ui.view">
1703             <field name="name">account.payment.term.form</field>
1704             <field name="model">account.payment.term</field>
1705             <field name="arch" type="xml">
1706                 <form string="Payment Term">
1707                     <group col="4">
1708                         <field name="name"/>
1709                         <field name="active"/>
1710                     </group>
1711                     <label for="note"/>
1712                     <field name="note" placeholder="Payment term explanation for the customer..."/>
1713                     <separator string="Computation"/>
1714                     <field name="line_ids"/>
1715                 </form>
1716             </field>
1717         </record>
1718         <record id="action_payment_term_form" model="ir.actions.act_window">
1719             <field name="name">Payment Terms</field>
1720             <field name="res_model">account.payment.term</field>
1721             <field name="view_type">form</field>
1722             <field name="view_mode">tree,form</field>
1723             <field name="search_view_id" ref="view_payment_term_search"/>
1724         </record>
1725         <menuitem action="action_payment_term_form"
1726             id="menu_action_payment_term_form" parent="menu_configuration_misc"/>
1727
1728         <!-- Account Subscriptions -->
1729         <record id="view_subscription_line_form" model="ir.ui.view">
1730             <field name="name">account.subscription.line.form</field>
1731             <field name="model">account.subscription.line</field>
1732             <field name="arch" type="xml">
1733                 <form string="Subscription lines">
1734                     <group>
1735                         <field name="date"/>
1736                         <field name="move_id"/>
1737                     </group>
1738                 </form>
1739             </field>
1740         </record>
1741         <record id="view_subscription_line_tree" model="ir.ui.view">
1742             <field name="name">account.subscription.line.tree</field>
1743             <field name="model">account.subscription.line</field>
1744             <field name="arch" type="xml">
1745                 <tree string="Subscription lines">
1746                     <field name="date"/>
1747                     <field name="move_id"/>
1748                 </tree>
1749             </field>
1750         </record>
1751         <record id="view_subscription_tree" model="ir.ui.view">
1752             <field name="name">account.subscription.tree</field>
1753             <field name="model">account.subscription</field>
1754             <field name="arch" type="xml">
1755                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'running'" string="Entry Subscription">
1756                     <field name="name"/>
1757                     <field name="model_id"/>
1758                     <field name="ref"/>
1759                     <field name="date_start"/>
1760                     <field name="state"/>
1761                 </tree>
1762             </field>
1763         </record>
1764         <record id="view_subscription_search" model="ir.ui.view">
1765             <field name="name">account.subscription.search</field>
1766             <field name="model">account.subscription</field>
1767             <field name="arch" type="xml">
1768                 <search string="Entry Subscription">
1769                     <field name="name" string="Account Subscription"/>
1770                     <field name="date_start"/>
1771                     <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
1772                     <filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
1773                     <field name="model_id"/>
1774                     <group expand="0" string="Group By">
1775                         <filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
1776                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1777                     </group>
1778                 </search>
1779             </field>
1780         </record>
1781         <record id="view_subscription_form" model="ir.ui.view">
1782             <field name="name">account.subscription.form</field>
1783             <field name="model">account.subscription</field>
1784             <field name="arch" type="xml">
1785                 <form string="Recurring">
1786                     <header>
1787                         <button name="state_draft" states="done" string="Set to Draft" type="object"  icon="gtk-convert" />
1788                         <button name="compute" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific" class="oe_highlight"/>
1789                         <button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove" class="oe_highlight"/>
1790                         <field name="state" widget="statusbar" statusbar_visible="draft,running,done"/>
1791                     </header>
1792                     <sheet>
1793                         <group>
1794                             <group>
1795                                 <field name="name"/>
1796                                 <field name="model_id"/>
1797                                 <field name="ref"/>
1798                             </group>
1799                             <group>
1800                                 <field name="date_start"/>
1801                                 <field name="period_type"/>
1802                                 <field name="period_nbr"/>
1803                                 <field name="period_total"/>
1804                             </group>
1805                         </group>
1806                         <separator string="Subscription Lines"/>
1807                         <field name="lines_id" widget="one2many_list"/>
1808                     </sheet>
1809                 </form>
1810             </field>
1811         </record>
1812         <record id="action_subscription_form" model="ir.actions.act_window">
1813             <field name="name">Recurring Lines</field>
1814             <field name="res_model">account.subscription</field>
1815             <field name="view_type">form</field>
1816             <field name="view_mode">tree,form</field>
1817             <field name="search_view_id" ref="view_subscription_search"/>
1818             <field name="help" type="html">
1819               <p class="oe_view_nocontent_create">
1820                 Click to define a new recurring entry.
1821               </p><p>
1822                 A recurring entry occurs on a recurrent basis from a specific
1823                 date, i.e. corresponding to the signature of a contract or an
1824                 agreement with a customer or a supplier. You can create such
1825                 entries to automate the postings in the system.
1826               </p>
1827             </field>
1828         </record>
1829         <menuitem
1830             name="Define Recurring Entries" action="action_subscription_form"
1831             id="menu_action_subscription_form" sequence="1"
1832             parent="account.menu_finance_recurrent_entries"/>
1833
1834         <record id="action_subscription_form_running" model="ir.actions.act_window">
1835             <field name="name">Running Subscriptions</field>
1836             <field name="res_model">account.subscription</field>
1837             <field name="view_type">form</field>
1838             <field name="view_mode">tree,form</field>
1839             <field name="domain">[('state','=','running')]</field>
1840             <field name="filter" eval="True"/>
1841         </record>
1842
1843         <record id="action_subscription_form_new" model="ir.actions.act_window">
1844             <field name="name">New Subscription</field>
1845             <field name="res_model">account.subscription</field>
1846             <field name="view_type">form</field>
1847             <field name="view_mode">form,tree</field>
1848             <field name="view_id" ref="view_subscription_form"/>
1849         </record>
1850
1851         <record id="view_subscription_line_form_complete" model="ir.ui.view">
1852             <field name="name">account.subscription.line.form</field>
1853             <field name="model">account.subscription.line</field>
1854             <field eval="20" name="priority"/>
1855             <field name="arch" type="xml">
1856                 <form string="Subscription lines">
1857                     <group col="4">
1858                         <field name="subscription_id"/>
1859                         <field name="date"/>
1860                         <field name="move_id"/>
1861                     </group>
1862                 </form>
1863             </field>
1864         </record>
1865
1866         <!-- Account Templates -->
1867         <menuitem
1868             id="account_template_folder"
1869             name="Templates"
1870             parent="account_account_menu"
1871             groups="account.group_account_manager"/>
1872         <menuitem
1873             id="account_template_taxes"
1874             name="Taxes"
1875             parent="account_template_folder"
1876             sequence="2"/>
1877         <menuitem
1878             id="account_template_accounts"
1879             name="Accounts"
1880             parent="account_template_folder"
1881             sequence="1"/>
1882
1883         <record id="view_account_template_form" model="ir.ui.view">
1884             <field name="name">account.account.template.form</field>
1885             <field name="model">account.account.template</field>
1886             <field name="arch" type="xml">
1887                 <form string="Account Template">
1888                     <group col="4">
1889                         <field name="name"/>
1890                         <field name="code"/>
1891                         <newline/>
1892                         <field name="parent_id"/>
1893                         <field name="shortcut"/>
1894                         <field name="type"/>
1895                         <field name="user_type"/>
1896
1897                         <field name="currency_id" groups="base.group_multi_currency"/>
1898                         <field name="reconcile"/>
1899                         <field name="chart_template_id"/>
1900                     </group>
1901                     <separator string="Default Taxes"/>
1902                     <field name="tax_ids"/>
1903                     <separator string="Notes"/>
1904                     <field name="note" placeholder="Internal notes..."/>
1905                 </form>
1906             </field>
1907         </record>
1908         <record id="view_account_template_tree" model="ir.ui.view">
1909             <field name="name">account.account.template.tree</field>
1910             <field name="model">account.account.template</field>
1911             <field name="arch" type="xml">
1912                 <tree string="Account Template">
1913                     <field name="code"/>
1914                     <field name="name"/>
1915                     <field name="type" invisible="1"/>
1916                     <field name="user_type" invisible="1"/>
1917                 </tree>
1918             </field>
1919         </record>
1920         <record id="view_account_template_search" model="ir.ui.view">
1921             <field name="name">account.account.template.search</field>
1922             <field name="model">account.account.template</field>
1923             <field name="arch" type="xml">
1924                 <search string="Search Account Templates">
1925                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Template"/>
1926                     <filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
1927                     <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
1928                     <field name="parent_id"/>
1929                     <field name="user_type"/>
1930                     <field name="type"/>
1931                     <group expand="0" string="Group By">
1932                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
1933                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
1934                    </group>
1935                 </search>
1936             </field>
1937         </record>
1938         <record id="action_account_template_form" model="ir.actions.act_window">
1939             <field name="name">Account Templates</field>
1940             <field name="res_model">account.account.template</field>
1941             <field name="view_type">form</field>
1942             <field name="view_mode">tree,form</field>
1943             <field name="search_view_id" ref="view_account_template_search"/>
1944         </record>
1945         <menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_template_accounts"/>
1946
1947         <record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
1948             <field name="name">Create Account</field>
1949             <field name="model">account.addtmpl.wizard</field>
1950             <field name="arch" type="xml">
1951                 <form string="Create Account">
1952                     <header>
1953                         <button icon="gtk-ok" name="action_create" string="Add" type="object" class="oe_highlight"  />
1954                     </header>
1955                     <separator col="4" colspan="4" string="Create an Account Based on this Template"/>
1956                     <field name="cparent_id"/>
1957                 </form>
1958             </field>
1959         </record>
1960
1961         <act_window domain="[]" id="action_account_addtmpl_wizard_form"
1962             name="Create Account"
1963             target="new"
1964             res_model="account.addtmpl.wizard"
1965             context="{'tmpl_ids': active_id}"
1966             src_model="account.account.template"
1967             view_type="form" view_mode="form"/>
1968
1969
1970         <!-- Chart of Accounts Templates -->
1971         <record id="view_account_chart_template_form" model="ir.ui.view">
1972             <field name="name">account.chart.template.form</field>
1973             <field name="model">account.chart.template</field>
1974             <field name="arch" type="xml">
1975                 <form string="Chart of Accounts Template">
1976                     <group col="4">
1977                         <field name="name"/>
1978                         <field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1979                         <field name="bank_account_view_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1980                         <field name="tax_code_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1981                         <field name="parent_id" />
1982                         <!--<field name="code_digits" />-->
1983                         <field name="visible" />
1984                         <field name="complete_tax_set" />
1985                     </group>
1986                     <separator string="Default Taxes" colspan="4"/>
1987                     <field name="tax_template_ids" colspan="4"  nolabel="1"/>
1988                     <separator string="Properties" colspan="4"/>
1989                     <group col="4">
1990                         <field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>
1991                         <field name="property_account_payable" domain="[('id', 'child_of', [account_root_id])]"/>
1992                         <field name="property_account_expense_categ" domain="[('id', 'child_of', [account_root_id])]"/>
1993                         <field name="property_account_income_categ" domain="[('id', 'child_of', [account_root_id])]" />
1994                         <field name="property_account_expense" domain="[('id', 'child_of', [account_root_id])]"/>
1995                         <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
1996                         <field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/>
1997                         <field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/>
1998                     </group>
1999                 </form>
2000             </field>
2001         </record>
2002         <record id="view_account_chart_template_seacrh" model="ir.ui.view">
2003             <field name="name">account.chart.template.search</field>
2004             <field name="model">account.chart.template</field>
2005             <field name="arch" type="xml">
2006                 <search string="Search Chart of Account Templates">
2007                     <field name="name" string="Account Template"/>
2008                     <field name="account_root_id"/>
2009                     <field name="bank_account_view_id"/>
2010                     <group expand="0" string="Group By">
2011                         <filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
2012                         <filter string="Bank Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
2013                         <filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
2014                         <filter string="Payable Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_payable'}"/>
2015                         <filter string="Income Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_income_categ'}"/>
2016                         <filter string="Expense Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_expense_categ'}"/>
2017                     </group>
2018                 </search>
2019             </field>
2020         </record>
2021         <record id="view_account_chart_template_tree" model="ir.ui.view">
2022             <field name="name">account.chart.template.tree</field>
2023             <field name="model">account.chart.template</field>
2024             <field name="arch" type="xml">
2025                 <tree string="Chart of Accounts Template">
2026                     <field name="name"/>
2027                     <field name="account_root_id"/>
2028                     <field name="tax_code_root_id"/>
2029                     <field name="bank_account_view_id"/>
2030                     <field name="property_account_receivable" invisible="1"/>
2031                     <field name="property_account_payable" invisible="1"/>
2032                     <field name="property_account_expense_categ" invisible="1"/>
2033                     <field name="property_account_income_categ" invisible="1"/>
2034                 </tree>
2035             </field>
2036         </record>
2037         <record id="action_account_chart_template_form" model="ir.actions.act_window">
2038             <field name="name">Chart of Accounts Templates</field>
2039             <field name="res_model">account.chart.template</field>
2040             <field name="view_type">form</field>
2041             <field name="view_mode">tree,form</field>
2042         </record>
2043         <menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts" sequence="1"/>
2044
2045         <!-- Account Tax Templates -->
2046         <record id="view_account_tax_template_form" model="ir.ui.view">
2047             <field name="name">account.tax.template.form</field>
2048             <field name="model">account.tax.template</field>
2049             <field name="arch" type="xml">
2050                 <form string="Account Tax Template">
2051                     <group col="4">
2052                         <field name="name"/>
2053                         <field name="description"/>
2054                         <field name="chart_template_id"/>
2055                         <field name="type"/>
2056                         <field name="type_tax_use"/>
2057                         <field name="price_include"/>
2058                     </group>
2059                     <notebook>
2060                         <page string="Tax Definition">
2061                             <group col="4">
2062                                 <field name="applicable_type"/>
2063                                 <field name="amount" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/>
2064                                 <field name="include_base_amount"/>
2065                                 <field name="domain"/>
2066                                 <newline/>
2067                                 <field name="account_collected_id"/>
2068                                 <label colspan="2" string="Keep empty to use the income account"/>
2069                                 <field name="account_paid_id"/>
2070                                 <label colspan="2" string="Keep empty to use the expense account"/>
2071                                 <field name="child_depend"/>
2072                                 <field name="sequence"/>
2073                             </group>
2074                         </page>
2075                         <page string="Tax Declaration">
2076                             <group col="4">
2077                                 <separator colspan="4" string="Invoices"/>
2078                                 <field name="base_code_id"/>
2079                                 <field name="base_sign"/>
2080                                 <field name="tax_code_id"/>
2081                                 <field name="tax_sign"/>
2082
2083                                 <separator colspan="4" string="Credit Notes"/>
2084                                 <field name="ref_base_code_id"/>
2085                                 <field name="ref_base_sign"/>
2086                                 <field name="ref_tax_code_id"/>
2087                                 <field name="ref_tax_sign"/>
2088                             </group>
2089                         </page>
2090                         <page string="Special Computation">
2091                             <separator string="Compute Code (if type=code)"/>
2092                             <field name="python_compute" attrs="{'readonly':[('type','!=','code')]}"/>
2093                             <separator string="Compute Code for Taxes Included Prices"/>
2094                             <field name="python_compute_inv"/>
2095                             <separator string="Applicable Code (if type=code)"/>
2096                             <field name="python_applicable" attrs="{'readonly':[('applicable_type','=','true')]}"/>
2097                         </page>
2098                     </notebook>
2099                 </form>
2100             </field>
2101         </record>
2102         <record id="view_account_tax_template_tree" model="ir.ui.view">
2103             <field name="name">account.tax.template.tree</field>
2104             <field name="model">account.tax.template</field>
2105             <field name="arch" type="xml">
2106                 <tree string="Account Tax Template">
2107                     <field name="name" />
2108                     <field name="description"/>
2109                 </tree>
2110             </field>
2111         </record>
2112         <record id="view_account_tax_template_search" model="ir.ui.view">
2113             <field name="name">account.tax.template.search</field>
2114             <field name="model">account.tax.template</field>
2115             <field name="arch" type="xml">
2116                 <search string="Search Tax Templates">
2117                     <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax Template"/>
2118                     <filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
2119                     <filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
2120                     <field name="chart_template_id"/>
2121                 </search>
2122             </field>
2123         </record>
2124         <record id="action_account_tax_template_form" model="ir.actions.act_window">
2125             <field name="name">Tax Templates</field>
2126             <field name="res_model">account.tax.template</field>
2127             <field name="view_type">form</field>
2128             <field name="view_mode">tree,form</field>
2129             <field name="search_view_id" ref="view_account_tax_template_search"/>
2130         </record>
2131         <menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_template_taxes" sequence="13"/>
2132
2133         <!-- Account Tax Code Templates -->
2134         <record id="view_tax_code_template_tree" model="ir.ui.view">
2135             <field name="name">account.tax.code.template.tree</field>
2136             <field name="model">account.tax.code.template</field>
2137             <field name="field_parent">child_ids</field>
2138             <field name="arch" type="xml">
2139                 <tree string="Account Tax Code Template" toolbar="1">
2140                     <field name="name"/>
2141                     <field name="code"/>
2142                     <field name="parent_id" invisible="1"/>
2143                 </tree>
2144             </field>
2145         </record>
2146         <record id="view_tax_code_template_search" model="ir.ui.view">
2147             <field name="name">account.tax.code.template.search</field>
2148             <field name="model">account.tax.code.template</field>
2149             <field name="arch" type="xml">
2150                 <search string="Search tax template">
2151                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Tax Template"/>
2152                     <field name="parent_id"/>
2153                     <group expand="0" string="Group By">
2154                         <filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
2155                     </group>
2156                 </search>
2157             </field>
2158         </record>
2159         <record id="view_tax_code_template_form" model="ir.ui.view">
2160             <field name="name">account.tax.code.template.form</field>
2161             <field name="model">account.tax.code.template</field>
2162             <field name="arch" type="xml">
2163                 <form string="Account Tax Code Template">
2164                     <group col="4">
2165                         <field name="name"/>
2166                         <field name="code"/>
2167                         <field name="parent_id"/>
2168                         <field name="sign"/>
2169                     </group>
2170                     <separator string="Description"/>
2171                     <field name="info"/>
2172                 </form>
2173             </field>
2174         </record>
2175         <record id="action_account_tax_code_template_form" model="ir.actions.act_window">
2176             <field name="name">Tax Code Templates</field>
2177             <field name="res_model">account.tax.code.template</field>
2178             <field name="view_type">form</field>
2179             <field name="view_mode">tree,form</field>
2180             <field name="search_view_id" ref="view_tax_code_template_search"/>
2181         </record>
2182         <menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
2183
2184
2185         <!--  Wizard for Multi Charts of Accounts -->
2186         <record id="view_wizard_multi_chart" model="ir.ui.view">
2187             <field name="name">Set Your Accounting Options</field>
2188             <field name="model">wizard.multi.charts.accounts</field>
2189             <field name="inherit_id" ref="base.res_config_view_base"/>
2190             <field name="arch" type="xml">
2191                 <form position="attributes">
2192                     <attribute name="string">Accounting Application Configuration</attribute>
2193                 </form>
2194                 <group string="res_config_contents" position="replace">
2195                     <field name="only_one_chart_template" invisible="1"/>
2196                     <field name="complete_tax_set" invisible="1"/>
2197                     <group col="1">
2198                         <group attrs="{'invisible': [('only_one_chart_template','=',True)]}">
2199                             <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
2200                         </group>
2201                         <group>
2202                             <field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
2203                             <field name="currency_id" class="oe_inline"/>
2204                             <field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
2205                             <label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2206                             <div attrs="{'invisible': [('complete_tax_set', '=', True)]}">
2207                                 <field name="sale_tax_rate" class="oe_inline" on_change="onchange_tax_rate(sale_tax_rate)"/> %%
2208                             </div>
2209                             <field name="purchase_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
2210                             <label for="purchase_tax_rate" string="Purchase Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2211                             <div attrs="{'invisible': [('complete_tax_set', '=', True)]}">
2212                                 <field name="purchase_tax_rate" class="oe_inline"/> %%
2213                             </div>
2214                         </group>
2215                         <group groups="account.group_account_user">
2216                             <field name="code_digits"/>
2217                         </group>
2218                     </group>
2219                 </group>
2220             </field>
2221         </record>
2222         <record id="action_wizard_multi_chart" model="ir.actions.act_window">
2223             <field name="name">Set Your Accounting Options</field>
2224             <field name="type">ir.actions.act_window</field>
2225             <field name="res_model">wizard.multi.charts.accounts</field>
2226             <field name="view_id" ref="view_wizard_multi_chart"/>
2227             <field name="view_type">form</field>
2228             <field name="view_mode">form</field>
2229             <field name="target">new</field>
2230         </record>
2231
2232         <record id="account_account_graph" model="ir.ui.view">
2233             <field name="name">account.account.graph</field>
2234             <field name="model">account.account</field>
2235             <field name="arch" type="xml">
2236                 <graph string="Account Statistics" type="bar">
2237                     <field name="name"/>
2238                     <field name="balance" operator="+"/>
2239                 </graph>
2240             </field>
2241          </record>
2242
2243          <!-- Fiscal Position Templates -->
2244
2245         <record id="view_account_position_template_search" model="ir.ui.view">
2246             <field name="name">account.fiscal.position.template.search</field>
2247             <field name="model">account.fiscal.position.template</field>
2248             <field name="arch" type="xml">
2249                 <search string="Fiscal Position">
2250                     <field name="name" string="Fiscal Position Template"/>
2251                 </search>
2252             </field>
2253         </record>
2254
2255         <record id="view_account_position_template_form" model="ir.ui.view">
2256             <field name="name">account.fiscal.position.template.form</field>
2257             <field name="model">account.fiscal.position.template</field>
2258             <field name="arch" type="xml">
2259                 <form string="Fiscal Position Template">
2260                     <group col="4">
2261                         <field name="name"/>
2262                         <field name="chart_template_id"/>
2263                     </group>
2264                     <field name="tax_ids">
2265                         <tree string="Taxes Mapping" editable="bottom">
2266                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2267                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2268                         </tree>
2269                         <form string="Taxes Mapping">
2270                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2271                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2272                         </form>
2273                     </field>
2274                     <field name="account_ids">
2275                         <tree string="Accounts Mapping" editable="bottom">
2276                             <field name="account_src_id"/>
2277                             <field name="account_dest_id"/>
2278                         </tree>
2279                         <form string="Accounts Mapping">
2280                             <field name="account_src_id"/>
2281                             <field name="account_dest_id"/>
2282                         </form>
2283                     </field>
2284                 </form>
2285             </field>
2286         </record>
2287         <record id="view_account_position_template_tree" model="ir.ui.view">
2288             <field name="name">account.fiscal.position.template.tree</field>
2289             <field name="model">account.fiscal.position.template</field>
2290             <field name="arch" type="xml">
2291                 <tree string="Fiscal Position">
2292                     <field name="name"/>
2293                 </tree>
2294             </field>
2295         </record>
2296
2297         <record id="action_account_fiscal_position_template_form" model="ir.actions.act_window">
2298             <field name="name">Fiscal Position Templates</field>
2299             <field name="res_model">account.fiscal.position.template</field>
2300             <field name="view_type">form</field>
2301             <field name="view_mode">tree,form</field>
2302             <field name="search_view_id" ref="view_account_position_template_search"/>
2303         </record>
2304
2305         <menuitem
2306             action="action_account_fiscal_position_template_form"
2307             id="menu_action_account_fiscal_position_form_template"
2308             parent="account_template_taxes" sequence="20"/>
2309
2310         <!-- Cash Statement -->
2311         <record id="view_cash_statement_tree" model="ir.ui.view">
2312             <field name="name">account.bank.statement.tree</field>
2313             <field name="model">account.bank.statement</field>
2314             <field name="arch" type="xml">
2315                 <tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state == 'open'" string="Statement">
2316                     <field name="name"/>
2317                     <field name="date"/>
2318                     <field name="period_id"/>
2319                     <field name="journal_id"/>
2320                     <field name="balance_start"/>
2321                     <field name="balance_end_real"/>
2322                     <field name="balance_end" invisible="1" />
2323                     <field name="state"/>
2324                 </tree>
2325             </field>
2326         </record>
2327         <record id="view_bank_statement_form2" model="ir.ui.view">
2328             <field name="name">account.bank.statement.form</field>
2329             <field name="model">account.bank.statement</field>
2330             <field name="priority">2</field>
2331             <field name="arch" type="xml">
2332                 <form string="Statement">
2333                 <header>
2334                     <field name="all_lines_reconciled" invisible="1" />
2335                     <span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
2336                         <button name="%(action_bank_reconcile_bank_statements)d" states="open" string="Reconcile" type="action" class="oe_highlight"/>
2337                     </span>
2338                     <span attrs="{'invisible':[('all_lines_reconciled','=',False)]}">
2339                         <button name="button_confirm_cash" states="open" string="Close CashBox" type="object" class="oe_highlight"/>
2340                     </span>
2341                     <button name="button_open" states="draft" string="Open CashBox" type="object" class="oe_highlight"/>
2342                     <button name="button_cancel" states="confirm,open" string="Cancel CashBox" type="object"/>
2343                     <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
2344                 </header>
2345                 <sheet string="Statement">
2346                     <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
2347                     <h1><field name="name" class="oe_inline" attrs="{'invisible':[('name','=','/')]}"/></h1>
2348                     <group>
2349                         <group>
2350                             <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection" domain="[('type', '=', 'cash')]" />
2351                             <field name="user_id" attrs="{'readonly':[('state','!=','draft')]}" string="Responsible"/>
2352                             <field name='company_id' widget="selection" groups="base.group_multi_company" />
2353                         </group>
2354                         <group>
2355                             <field name="date" attrs="{'readonly':[('state','!=','draft')]}"  on_change="onchange_date(date, company_id)"/>
2356                             <field name="closing_date" readonly="1"/>
2357                             <field name="period_id" class="oe_inline"/>
2358                             <field name="currency" invisible="1"/>
2359                             <field name="cash_control" invisible="1"/>
2360                         </group>
2361                     </group>
2362                     <notebook>
2363                         <page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
2364                             <field name="line_ids" context="{'date':date}">
2365                                 <tree editable="bottom" string="Statement lines">
2366                                     <field name="sequence" invisible="1"/>
2367                                     <field name="date"/>
2368                                     <field name="name"/>
2369                                     <field name="ref"/>
2370                                     <field name="partner_id"/>
2371                                     <field name="amount"/>
2372                                 </tree>
2373                                 <form string="Statement lines">
2374                                     <group col="4">
2375                                         <field name="date"/>
2376                                         <field name="name"/>
2377                                         <field name="ref"/>
2378                                         <field name="partner_id"/>
2379                                         <field name="amount"/>
2380                                         <field name="sequence"/>
2381                                     </group>
2382                                     <separator string="Notes"/>
2383                                     <field name="note"/>
2384                                 </form>
2385                             </field>
2386                         </page>
2387                         <page string="Cash Control" attrs="{'invisible' : [('cash_control', '=', False)]}">
2388                             <group col="2" expand="1">
2389                                 <group string="Opening Cash Control" attrs="{'invisible' : [('state', '!=', 'draft')]}">
2390                                     <field name="opening_details_ids" colspan="2" nolabel="1">
2391                                         <tree string="Opening Cashbox Lines" editable="bottom">
2392                                             <field name="pieces"/>
2393                                             <field name="number_opening" on_change="on_change_sub_opening(pieces, number_opening)" />
2394                                             <field name="subtotal_opening" string="Opening Subtotal" sum="Total"/>
2395                                         </tree>
2396                                     </field>
2397                                 </group>
2398                                 <group>
2399                                     <group string="Opening Cash Control" attrs="{'invisible' : [('state', '=', 'draft')]}">
2400                                         <field name="details_ids" colspan="2" nolabel="1" attrs="{'readonly' : [('state', '!=', 'draft')]}">
2401                                             <tree string="Opening Cashbox Lines" editable="bottom">
2402                                                 <field name="pieces"/>
2403                                                 <field name="number_opening" on_change="on_change_sub_opening(pieces, number_opening)"/>
2404                                                 <field name="subtotal_opening" string="Opening Subtotal" sum="Total"/>
2405                                             </tree>
2406                                         </field>
2407                                     </group>
2408                                     <group string="Closing Cash Control" attrs="{'invisible' : [('state', '=', 'draft')]}">
2409                                         <field name="closing_details_ids" colspan="2" nolabel="1" attrs="{'readonly' : [('state', '=', 'confirm')]}">
2410                                             <tree string="Closing Cashbox Lines" editable="bottom">
2411                                                 <field name="pieces" readonly="1" />
2412                                                 <field name="number_closing" on_change="on_change_sub_closing(pieces, number_closing)"/>
2413                                                 <field name="subtotal_closing" string="Closing Subtotal" sum="Total"/>
2414                                             </tree>
2415                                         </field>
2416                                     </group>
2417                                 </group>
2418                             </group>
2419                         </page>
2420                         <page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
2421                             <field name="move_line_ids" string="Journal Entries"/>
2422                         </page>
2423                     </notebook>
2424                     <group>
2425                         <group class="oe_subtotal_footer oe_right">
2426                             <label for="balance_start" class="oe_subtotal_footer_separator oe_open_balance" string="Opening Balance" style="padding-right: 23px !important; padding-top: 6px !important;"/>
2427                             <field name="balance_start" attrs="{'readonly' : ['|', ('cash_control', '=', True), ('state', '=', 'confirm')]}" nolabel="1" widget="monetary" class="oe_subtotal_footer_separator oe_open_balance" options="{'currency_field': 'currency'}" help="Total of opening cash control lines"/>
2428                             <label for="total_entry_encoding" string="+ Transactions" class="oe_force_bold oe_mini_subtotal_footer_separator" style="padding-right: 20px !important;"/>
2429                             <field name="total_entry_encoding" nolabel="1" class="oe_bold oe_account_total" widget="monetary" options="{'currency_field': 'currency'}"/>
2430                             <label for="balance_end" string="= Theoretical Closing Balance" class="oe_force_bold oe_mini_subtotal_footer_separator" style="padding-right: 20px !important;" help="Sum of opening balance and transactions."/>
2431                             <field name="balance_end" nolabel="1" class="oe_bold oe_account_total" widget="monetary" options="{'currency_field': 'currency'}"/>
2432                         </group>
2433                         <div>
2434                             <group class="oe_subtotal_footer oe_right" attrs="{'invisible': [('state', '=', 'draft')]}">
2435                                 <label for="balance_end_real" class="oe_subtotal_footer_separator oe_real_closing_balance" string="Real Closing Balance" style="padding-right: 23px !important; padding-top: 6px !important;"/>
2436                                 <field name="balance_end_real" attrs="{'readonly' : ['|', ('cash_control', '=', True), ('state', '=', 'confirm')]}" nolabel="1" class="oe_subtotal_footer_separator oe_real_closing_balance" widget="monetary" options="{'currency_field': 'currency'}" help="Total of closing cash control lines."/>
2437                             </group>
2438                             <group/>
2439                             <group/>
2440                             <group class="oe_subtotal_footer oe_right" attrs="{'invisible': [('state', '=', 'draft')]}">
2441                                 <label for="difference" string="Difference" class="oe_subtotal_footer_separator oe_difference" style="padding-right: 20px !important;"/>
2442                                 <field name="difference" nolabel="1" class="oe_subtotal_footer_separator oe_difference" widget="monetary" options="{'currency_field': 'currency'}"/>
2443                             </group>
2444                         </div>
2445                     </group>
2446                 </sheet>
2447                 </form>
2448             </field>
2449         </record>
2450         <record id="account_cash_statement_graph" model="ir.ui.view">
2451             <field name="name">account.bank.statement.graph</field>
2452             <field name="model">account.bank.statement</field>
2453             <field name="arch" type="xml">
2454                 <graph string="Account Statistics" type="bar">
2455                     <field name="date"/>
2456                     <field name="balance_start" operator="+"/>
2457                     <field name="balance_end" operator="+"/>
2458                 </graph>
2459             </field>
2460          </record>
2461         <record id="action_view_bank_statement_tree" model="ir.actions.act_window">
2462             <field name="name">Cash Registers</field>
2463             <field name="type">ir.actions.act_window</field>
2464             <field name="res_model">account.bank.statement</field>
2465             <field name="view_type">form</field>
2466             <field name="view_mode">tree,form,graph</field>
2467             <field name="view_id" ref="view_cash_statement_tree"/>
2468             <field name="search_view_id" ref="view_account_bank_statement_filter"/>
2469             <field name="domain">[('journal_id.type', '=', 'cash')]</field>
2470             <field name="context">{'journal_type':'cash'}</field>
2471             <field name="help" type="html">
2472               <p class="oe_view_nocontent_create">
2473                 Click to create a new cash log.
2474               </p><p>
2475                 A Cash Register allows you to manage cash entries in your cash
2476                 journals. This feature provides an easy way to follow up cash
2477                 payments on a daily basis. You can enter the coins that are in
2478                 your cash box, and then post entries when money comes in or
2479                 goes out of the cash box.
2480               </p>
2481             </field>
2482         </record>
2483
2484         <record model="ir.actions.act_window.view" id="act_cash_statement1_all">
2485             <field name="sequence" eval="1"/>
2486             <field name="view_mode">tree</field>
2487             <field name="view_id" ref="view_cash_statement_tree"/>
2488             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2489         </record>
2490         <record model="ir.actions.act_window.view" id="act_cash_statement2_all">
2491             <field name="sequence" eval="1"/>
2492             <field name="view_mode">form</field>
2493             <field name="view_id" ref="view_bank_statement_form2"/>
2494             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2495         </record>
2496         <record model="ir.actions.act_window.view" id="act_cash_statement3_all">
2497             <field name="sequence" eval="1"/>
2498             <field name="view_mode">graph</field>
2499             <field name="view_id" ref="account_cash_statement_graph"/>
2500             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2501         </record>
2502         <menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines"
2503             parent="menu_finance_bank_and_cash"/>
2504
2505         <menuitem id="menu_account_customer" name="Customers"
2506             parent="menu_finance_receivables"
2507             action="base.action_partner_customer_form" sequence="100"/>
2508
2509         <menuitem id="menu_account_supplier" name="Suppliers"
2510             parent="menu_finance_payables"
2511             action="base.action_partner_supplier_form" sequence="100"/>
2512
2513         <!-- Account Reports -->
2514         <record id="view_account_financial_report_form" model="ir.ui.view">
2515             <field name="name">account.financial.report.form</field>
2516             <field name="model">account.financial.report</field>
2517             <field name="arch" type="xml">
2518                 <form string="Account Report">
2519                     <group col="4">
2520                         <field name="name"/>
2521                         <field name="parent_id"/>
2522                         <field name="sequence"/>
2523                         <field name="type"/>
2524                         <field name="sign"/>
2525                         <field name="style_overwrite"/>
2526                     </group>
2527                     <notebook attrs="{'invisible': [('type','not in',['accounts','account_type'])]}">
2528                         <page string="Report">
2529                             <group>
2530                                 <field name="display_detail" attrs="{'invisible': [('type','not in',['accounts','account_type'])]}"/>
2531                                 <field name="account_report_id" attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
2532                             </group>
2533                             <field name="account_ids" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
2534                             <field name="account_type_ids" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
2535                         </page>
2536                     </notebook>
2537                 </form>
2538             </field>
2539         </record>
2540         <record id="view_account_financial_report_tree" model="ir.ui.view">
2541             <field name="name">account.financial.report.tree</field>
2542             <field name="model">account.financial.report</field>
2543             <field name="arch" type="xml">
2544                 <tree string="Account Report">
2545                     <field name="name"/>
2546                     <field name="parent_id" invisible="1"/>
2547                     <field name="type"/>
2548                     <field name="account_report_id"/>
2549                 </tree>
2550             </field>
2551         </record>
2552         <record id="view_account_financial_report_search" model="ir.ui.view">
2553             <field name="name">account.financial.report.search</field>
2554             <field name="model">account.financial.report</field>
2555             <field name="arch" type="xml">
2556                 <search string="Account Report">
2557                     <field name="name" string="Account Report"/>
2558                     <field name="type"/>
2559                     <field name="account_report_id"/>
2560                     <group expand="0" string="Group By">
2561                         <filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
2562                         <filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2563                     </group>
2564                 </search>
2565             </field>
2566         </record>
2567         <record id="action_account_financial_report_tree" model="ir.actions.act_window">
2568             <field name="name">Financial Reports</field>
2569             <field name="type">ir.actions.act_window</field>
2570             <field name="res_model">account.financial.report</field>
2571             <field name="view_type">form</field>
2572             <field name="view_mode">tree,form</field>
2573             <field name="search_view_id" ref="view_account_financial_report_search"/>
2574             <field name="view_id" ref="view_account_financial_report_tree"/>
2575         </record>
2576         <menuitem id="menu_account_financial_reports_tree" name="Account Reports" parent="menu_account_reports" action="action_account_financial_report_tree"/>
2577
2578         <record id="view_account_report_tree_hierarchy" model="ir.ui.view">
2579             <field name="name">account.report.hierarchy</field>
2580             <field name="model">account.financial.report</field>
2581             <field name="field_parent">children_ids</field>
2582             <field name="arch" type="xml">
2583                 <tree string="Account Reports Hierarchy">
2584                     <field name="name"/>
2585                     <field name="type"/>
2586                     <field name="parent_id" invisible="1"/>
2587                     <field name="account_report_id"/>
2588                 </tree>
2589             </field>
2590         </record>
2591         <record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
2592             <field name="name">Financial Reports Hierarchy</field>
2593             <field name="res_model">account.financial.report</field>
2594             <field name="view_type">tree</field>
2595             <field name="view_id" ref="view_account_report_tree_hierarchy"/>
2596             <field name="domain">[('parent_id','=',False)]</field>
2597         </record>
2598         <menuitem id="menu_account_report_tree_hierarchy" name="Account Reports Hierarchy"
2599                   parent="menu_account_reports" action="action_account_report_tree_hierarchy"/>
2600
2601     </data>
2602 </openerp>