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