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