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