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