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