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