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